From 0e554c5ab1225f9dc8ed1f60657622bbdcf8d165 Mon Sep 17 00:00:00 2001 From: Yulia Persky Date: Wed, 19 Jun 2024 01:59:24 +0300 Subject: [PATCH 1/2] adding support for cephfs Signed-off-by: Yulia Persky --- .../pv/pv_services/test_rbd_rwop_pvc.py | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/functional/pv/pv_services/test_rbd_rwop_pvc.py b/tests/functional/pv/pv_services/test_rbd_rwop_pvc.py index 6828ce82e9a..eb25e168b34 100644 --- a/tests/functional/pv/pv_services/test_rbd_rwop_pvc.py +++ b/tests/functional/pv/pv_services/test_rbd_rwop_pvc.py @@ -19,6 +19,13 @@ log = logging.getLogger(__name__) +@pytest.mark.parametrize( + argnames="interface", + argvalues=[ + pytest.param(*[constants.CEPHBLOCKPOOL]), + pytest.param(*[constants.CEPHFILESYSTEM]), + ], +) @green_squad @skipif_ocs_version("<4.15") class TestRwopPvc(ManageTest): @@ -27,20 +34,20 @@ class TestRwopPvc(ManageTest): """ @pytest.fixture(autouse=True) - def setup(self, project_factory, pvc_factory, pod_factory): + def setup(self, project_factory, pvc_factory, pod_factory, interface): """ Create PVC and pods """ self.pvc_obj = pvc_factory( - interface=constants.CEPHBLOCKPOOL, + interface=interface, access_mode=constants.ACCESS_MODE_RWOP, size=10, ) @polarion_id("OCS-5456") @tier1 - def test_pod_with_same_priority(self, pod_factory): + def test_pod_with_same_priority(self, pod_factory, interface): """ Test RBD Block volume mode RWOP PVC @@ -55,7 +62,7 @@ def test_pod_with_same_priority(self, pod_factory): new_pod_obj = helpers.create_pods( [self.pvc_obj], pod_factory, - constants.CEPHBLOCKPOOL, + interface, ) # sleep for 60s @@ -161,7 +168,7 @@ def test_rwop_with_low_priority_pod(self, pod_factory, teardown_factory): @polarion_id("OCS-5472") @tier1 - def test_rwop_create_pod_on_different_node(self, pod_factory): + def test_rwop_create_pod_on_different_node(self, pod_factory, interface): """ Test RBD Block volume access mode by creating pods on different nodes """ @@ -169,14 +176,14 @@ def test_rwop_create_pod_on_different_node(self, pod_factory): worker_nodes_list = node.get_worker_nodes() log.info(f"Creating pod on {worker_nodes_list[0]}") pod_factory( - interface=constants.CEPHBLOCKPOOL, + interface=interface, pvc=self.pvc_obj, node_name=worker_nodes_list[0], ) log.info(f"Creating second pod on {worker_nodes_list[1]}") second_pod_obj = pod_factory( - interface=constants.CEPHBLOCKPOOL, + interface=interface, pvc=self.pvc_obj, status=None, node_name=worker_nodes_list[1], From 0017d7e8b75a420255e26ed4196cf79bca26f56b Mon Sep 17 00:00:00 2001 From: Yulia Persky Date: Wed, 19 Jun 2024 02:04:24 +0300 Subject: [PATCH 2/2] renaming the test Signed-off-by: Yulia Persky --- .../pv/pv_services/{test_rbd_rwop_pvc.py => test_rwop_pvc.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/functional/pv/pv_services/{test_rbd_rwop_pvc.py => test_rwop_pvc.py} (100%) diff --git a/tests/functional/pv/pv_services/test_rbd_rwop_pvc.py b/tests/functional/pv/pv_services/test_rwop_pvc.py similarity index 100% rename from tests/functional/pv/pv_services/test_rbd_rwop_pvc.py rename to tests/functional/pv/pv_services/test_rwop_pvc.py