Skip to content

Commit

Permalink
Passing correct accessmode to the tests pvc (red-hat-storage#9358)
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Durgbuns <[email protected]>
  • Loading branch information
shivamdurgbuns authored and prsurve committed Mar 1, 2024
1 parent 403aae6 commit 7d7269e
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions tests/functional/pv/pvc_clone/test_pvc_to_pvc_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TestClone(ManageTest):
"""

@pytest.fixture(autouse=True)
def setup(self, interface_type, pvc_factory, pod_factory, pod_dict_path):
def setup(self, interface_type, pvc_factory, pod_factory, pod_dict_path, access):
"""
create resources for the test
Expand All @@ -40,7 +40,10 @@ def setup(self, interface_type, pvc_factory, pod_factory, pod_dict_path):
"""
self.pvc_obj = pvc_factory(
interface=interface_type, size=1, status=constants.STATUS_BOUND
interface=interface_type,
size=1,
status=constants.STATUS_BOUND,
access_mode=access,
)
self.pod_obj = pod_factory(
interface=interface_type,
Expand All @@ -50,13 +53,19 @@ def setup(self, interface_type, pvc_factory, pod_factory, pod_dict_path):
)

@pytest.mark.parametrize(
argnames=["interface_type", "pod_dict_path"],
argnames=["interface_type", "pod_dict_path", "access"],
argvalues=[
pytest.param(
constants.CEPHBLOCKPOOL, None, marks=pytest.mark.polarion_id("OCS-2284")
constants.CEPHBLOCKPOOL,
None,
constants.ACCESS_MODE_RWO,
marks=pytest.mark.polarion_id("OCS-2284"),
),
pytest.param(
constants.CEPHFILESYSTEM, None, marks=pytest.mark.polarion_id("OCS-256")
constants.CEPHFILESYSTEM,
None,
constants.ACCESS_MODE_RWO,
marks=pytest.mark.polarion_id("OCS-256"),
),
],
)
Expand Down Expand Up @@ -144,9 +153,13 @@ def test_pvc_to_pvc_clone(self, interface_type, teardown_factory):

@pytest.mark.polarion_id("OCS-5162")
@pytest.mark.parametrize(
argnames=["interface_type", "pod_dict_path"],
argnames=["interface_type", "pod_dict_path", "access"],
argvalues=[
pytest.param(constants.CEPHFILESYSTEM, constants.CSI_CEPHFS_ROX_POD_YAML),
pytest.param(
constants.CEPHFILESYSTEM,
constants.CSI_CEPHFS_ROX_POD_YAML,
constants.ACCESS_MODE_RWX,
),
],
)
def test_pvc_to_pvc_rox_clone(
Expand Down

0 comments on commit 7d7269e

Please sign in to comment.