]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: use nfs/mds instead of nfs/rgw
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 14 Jun 2021 15:28:56 +0000 (17:28 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 16 Jun 2021 07:33:59 +0000 (09:33 +0200)
needed for the update job in stable-6.0 branch.
the upgrade from either nautilus or octopus to pacific isnt supported
when nfs/rgw is deployed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
tests/conftest.py
tests/functional/all_daemons/container/group_vars/nfss [new file with mode: 0644]
tests/functional/all_daemons/group_vars/nfss
tests/functional/tests/nfs/test_nfs_ganesha.py

index f928cf277ecd9f0b70e78c3465ef61c87d3eaee6..adbebc6ac8438e3f4e26d64a7fd655553ce7574a 100644 (file)
@@ -103,6 +103,8 @@ def node(host, request):
     group_names = ansible_vars["group_names"]
     docker = ansible_vars.get("docker")
     dashboard = ansible_vars.get("dashboard_enabled", True)
+    nfs_file_gw = ansible_vars.get("nfs_file_gw")
+    nfs_obj_gw = ansible_vars.get("nfs_obj_gw")
     radosgw_num_instances = ansible_vars.get("radosgw_num_instances", 1)
     ceph_release_num = {
         'jewel': 10,
@@ -146,6 +148,12 @@ def node(host, request):
     if request.node.get_closest_marker("dashboard") and group_names == ['clients']:
         pytest.skip('Not a valid test for client node')
 
+    if request.node.get_closest_marker("no_nfs_file_gw") and nfs_file_gw:
+        pytest.skip('Not a valid test for nfs+cephfs node')
+
+    if request.node.get_closest_marker("no_nfs_obj_gw") and nfs_obj_gw:
+        pytest.skip('Not a valid test for nfs+rgw node')
+
     data = dict(
         vars=ansible_vars,
         docker=docker,
@@ -153,6 +161,8 @@ def node(host, request):
         ceph_release_num=ceph_release_num,
         rolling_update=rolling_update,
         radosgw_num_instances=radosgw_num_instances,
+        nfs_file_gw=nfs_file_gw,
+        nfs_obj_gw=nfs_obj_gw,
     )
     return data
 
diff --git a/tests/functional/all_daemons/container/group_vars/nfss b/tests/functional/all_daemons/container/group_vars/nfss
new file mode 100644 (file)
index 0000000..f720a86
--- /dev/null
@@ -0,0 +1,4 @@
+---
+copy_admin_key: true
+nfs_file_gw: true
+nfs_obj_gw: false
index 35916be6b19f1b51b7de9c398580a320e164a0d2..f736694f51966ff20c8939f2df77ec030117f030 100644 (file)
@@ -1,6 +1,6 @@
 copy_admin_key: true
-nfs_file_gw: false
-nfs_obj_gw: true
+nfs_file_gw: true
+nfs_obj_gw: false
 ganesha_conf_overrides: |
     CACHEINODE {
             Entries_HWMark = 100000;
index b3c92ebafb0416cc77e9fcd9cd92daaeea3beb81..18f9ecaea2cb728edf1e3f9d4b323220885fc0f8 100644 (file)
@@ -5,11 +5,21 @@ import pytest
 class TestNFSs(object):
 
     @pytest.mark.no_docker
+    @pytest.mark.no_nfs_file_gw
     @pytest.mark.parametrize('pkg', [
         'nfs-ganesha',
         'nfs-ganesha-rgw'
     ])
-    def test_nfs_ganesha_package_is_installed(self, node, host, pkg):
+    def test_nfs_ganesha_rgw_package_is_installed(self, node, host, pkg):
+        assert host.package(pkg).is_installed
+
+    @pytest.mark.no_docker
+    @pytest.mark.no_nfs_obj_gw
+    @pytest.mark.parametrize('pkg', [
+        'nfs-ganesha-ceph',
+        'nfs-ganesha-rados-grace'
+    ])
+    def test_nfs_ganesha_fs_package_is_installed(self, node, host, pkg):
         assert host.package(pkg).is_installed
 
     @pytest.mark.no_docker
@@ -23,6 +33,7 @@ class TestNFSs(object):
         assert host.file(
             "/etc/ganesha/ganesha.conf").contains("Entries_HWMark")
 
+    @pytest.mark.no_nfs_file_gw
     def test_nfs_is_up(self, node, host, setup):
         hostname = node["vars"]["inventory_hostname"]
         cluster = setup['cluster_name']