Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RWOP - adding support for cephFS for all the test cases #9962

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading