Skip to content

Commit

Permalink
RWOP - adding support for cephFS for all the test cases (#9962)
Browse files Browse the repository at this point in the history
* adding support for cephfs
This PR adds support ( and implementation) for CephFS for all the existing test cases of RWOP feature.

Signed-off-by: Yulia Persky <[email protected]>
  • Loading branch information
ypersky1980 authored Jun 19, 2024
1 parent 0b25e07 commit 488ba60
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -161,22 +168,22 @@ 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
"""

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],
Expand Down

0 comments on commit 488ba60

Please sign in to comment.