mirror of https://github.com/ceph/ceph-ansible.git
nfs: add automated testing for nfs-ganesha roles
Signed-off-by: Ali Maredia <amaredia@redhat.com>pull/1780/head
parent
55724c6e93
commit
c907ec41ae
|
@ -103,6 +103,8 @@ def pytest_collection_modifyitems(session, config, items):
|
|||
item.add_marker(pytest.mark.mdss)
|
||||
elif "rgw" in test_path:
|
||||
item.add_marker(pytest.mark.rgws)
|
||||
elif "nfs" in test_path:
|
||||
item.add_marker(pytest.mark.nfss)
|
||||
else:
|
||||
item.add_marker(pytest.mark.all)
|
||||
|
||||
|
|
|
@ -22,3 +22,7 @@ ceph_conf_overrides:
|
|||
global:
|
||||
osd_pool_default_pg_num: 8
|
||||
osd_pool_default_size: 1
|
||||
nfs_ganesha_stable: true
|
||||
nfs_ganesha_dev: false
|
||||
nfs_ganesha_stable_branch: V2.5-stable
|
||||
nfs_ganesha_flavor: "ceph_master"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
copy_admin_key: true
|
||||
nfs_file_gw: false
|
||||
nfs_obj_gw: true
|
|
@ -17,3 +17,6 @@ ceph-client0
|
|||
|
||||
[mgrs]
|
||||
ceph-mgr0
|
||||
|
||||
[nfss]
|
||||
nfs0
|
||||
|
|
|
@ -8,7 +8,7 @@ mon_vms: 3
|
|||
osd_vms: 1
|
||||
mds_vms: 1
|
||||
rgw_vms: 1
|
||||
nfs_vms: 0
|
||||
nfs_vms: 1
|
||||
rbd_mirror_vms: 0
|
||||
client_vms: 1
|
||||
iscsi_gw_vms: 0
|
||||
|
|
|
@ -13,5 +13,16 @@
|
|||
dest: "{{ change_dir }}/group_vars/all"
|
||||
when: change_dir is defined
|
||||
|
||||
- name: change nfs-ganesha repository to 'dev'
|
||||
replace:
|
||||
regexp: "nfs_ganesha_stable:.*"
|
||||
replace: "nfs_ganesha_stable: false"
|
||||
dest: "{{ change_dir }}/group_vars/all"
|
||||
replace:
|
||||
regexp: "nfs_ganesha_dev:.*"
|
||||
replace: "nfs_ganesha_dev: true"
|
||||
dest: "{{ change_dir }}/group_vars/all"
|
||||
when: change_dir is defined
|
||||
|
||||
- name: print contents of {{ change_dir }}/group_vars/all
|
||||
command: "cat {{ change_dir }}/group_vars/all"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import pytest
|
||||
|
||||
class TestNFSs(object):
|
||||
|
||||
@pytest.mark.no_docker
|
||||
def test_nfs_ganesha_is_installed(self, node, host):
|
||||
assert host.package("nfs-ganesha").is_installed
|
||||
|
||||
@pytest.mark.no_docker
|
||||
def test_nfs_ganesha_rgw_package_is_installed(self, node, host):
|
||||
assert host.package("nfs-ganesha-rgw").is_installed
|
||||
|
||||
@pytest.mark.no_docker
|
||||
def test_nfs_services_are_running(self, node, host):
|
||||
assert host.service("nfs-ganesha").is_running
|
||||
|
||||
@pytest.mark.no_docker
|
||||
def test_nfs_services_are_enabled(self, node, host):
|
||||
assert host.service("nfs-ganesha").is_enabled
|
|
@ -24,3 +24,8 @@ debian_ceph_packages:
|
|||
- ceph
|
||||
- ceph-common
|
||||
- ceph-fuse
|
||||
nfs_ganesha_stable: true
|
||||
nfs_ganesha_stable_branch: V2.5-stable
|
||||
nfs_ganesha_stable_deb_repo: "{{ ceph_mirror }}/nfs-ganesha/deb-{{ nfs_ganesha_stable_branch }}/{{ ceph_stable_release }}"
|
||||
nfs_ganesha_dev: false
|
||||
nfs_ganesha_flavor: "ceph_master"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
copy_admin_key: true
|
||||
nfs_file_gw: false
|
||||
nfs_obj_gw: true
|
|
@ -17,3 +17,6 @@ client0
|
|||
|
||||
[mgrs]
|
||||
mgr0
|
||||
|
||||
[nfss]
|
||||
nfs0
|
||||
|
|
|
@ -8,7 +8,7 @@ mon_vms: 3
|
|||
osd_vms: 1
|
||||
mds_vms: 1
|
||||
rgw_vms: 1
|
||||
nfs_vms: 0
|
||||
nfs_vms: 1
|
||||
rbd_mirror_vms: 0
|
||||
client_vms: 1
|
||||
iscsi_gw_vms: 0
|
||||
|
|
Loading…
Reference in New Issue