diff --git a/tests/conftest.py b/tests/conftest.py index 795472815..f8b2ec92e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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) diff --git a/tests/functional/centos/7/cluster/group_vars/all b/tests/functional/centos/7/cluster/group_vars/all index 9e552e797..1d581d847 100644 --- a/tests/functional/centos/7/cluster/group_vars/all +++ b/tests/functional/centos/7/cluster/group_vars/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" diff --git a/tests/functional/centos/7/cluster/group_vars/nfss b/tests/functional/centos/7/cluster/group_vars/nfss new file mode 100644 index 000000000..f2f86b825 --- /dev/null +++ b/tests/functional/centos/7/cluster/group_vars/nfss @@ -0,0 +1,3 @@ +copy_admin_key: true +nfs_file_gw: false +nfs_obj_gw: true diff --git a/tests/functional/centos/7/cluster/hosts b/tests/functional/centos/7/cluster/hosts index 4aeca7b05..5e1ac46f6 100644 --- a/tests/functional/centos/7/cluster/hosts +++ b/tests/functional/centos/7/cluster/hosts @@ -17,3 +17,6 @@ ceph-client0 [mgrs] ceph-mgr0 + +[nfss] +nfs0 diff --git a/tests/functional/centos/7/cluster/vagrant_variables.yml b/tests/functional/centos/7/cluster/vagrant_variables.yml index ad1b9b2be..a711032a9 100644 --- a/tests/functional/centos/7/cluster/vagrant_variables.yml +++ b/tests/functional/centos/7/cluster/vagrant_variables.yml @@ -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 diff --git a/tests/functional/dev_setup.yml b/tests/functional/dev_setup.yml index 1fa60cda5..92ab4b3b3 100644 --- a/tests/functional/dev_setup.yml +++ b/tests/functional/dev_setup.yml @@ -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" diff --git a/tests/functional/tests/nfs/test_nfs_ganesha.py b/tests/functional/tests/nfs/test_nfs_ganesha.py new file mode 100644 index 000000000..58cc385d1 --- /dev/null +++ b/tests/functional/tests/nfs/test_nfs_ganesha.py @@ -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 diff --git a/tests/functional/ubuntu/16.04/cluster/group_vars/all b/tests/functional/ubuntu/16.04/cluster/group_vars/all index b12fab9c9..b4326d2fe 100644 --- a/tests/functional/ubuntu/16.04/cluster/group_vars/all +++ b/tests/functional/ubuntu/16.04/cluster/group_vars/all @@ -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" diff --git a/tests/functional/ubuntu/16.04/cluster/group_vars/nfss b/tests/functional/ubuntu/16.04/cluster/group_vars/nfss new file mode 100644 index 000000000..f2f86b825 --- /dev/null +++ b/tests/functional/ubuntu/16.04/cluster/group_vars/nfss @@ -0,0 +1,3 @@ +copy_admin_key: true +nfs_file_gw: false +nfs_obj_gw: true diff --git a/tests/functional/ubuntu/16.04/cluster/hosts b/tests/functional/ubuntu/16.04/cluster/hosts index dfe4ef817..e42554e9b 100644 --- a/tests/functional/ubuntu/16.04/cluster/hosts +++ b/tests/functional/ubuntu/16.04/cluster/hosts @@ -17,3 +17,6 @@ client0 [mgrs] mgr0 + +[nfss] +nfs0 diff --git a/tests/functional/ubuntu/16.04/cluster/vagrant_variables.yml b/tests/functional/ubuntu/16.04/cluster/vagrant_variables.yml index 40e76fefd..ff51b872d 100644 --- a/tests/functional/ubuntu/16.04/cluster/vagrant_variables.yml +++ b/tests/functional/ubuntu/16.04/cluster/vagrant_variables.yml @@ -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