diff --git a/tests/functional/pv/pv_services/test_raw_block_pv.py b/tests/functional/pv/pv_services/test_raw_block_pv.py index 5350e7c7b25..8ea2a465afb 100644 --- a/tests/functional/pv/pv_services/test_raw_block_pv.py +++ b/tests/functional/pv/pv_services/test_raw_block_pv.py @@ -134,6 +134,7 @@ def raw_block_pv(self): storage_type=storage_type, size=f"{random.randint(10,200)}M", invalidate=0, + direct=1, ) for pod in pvc_gb_pods: log.info(f"running io on pod {pod.name}") @@ -142,6 +143,7 @@ def raw_block_pv(self): storage_type=storage_type, size=f"{random.randint(1,5)}G", invalidate=0, + direct=1, ) for pod in pvc_tb_pods: log.info(f"running io on pod {pod.name}") @@ -150,6 +152,7 @@ def raw_block_pv(self): storage_type=storage_type, size=f"{random.randint(10,15)}G", invalidate=0, + direct=1, ) for pod in pods: diff --git a/tests/functional/pv/pv_services/test_run_io_multiple_dc_pods.py b/tests/functional/pv/pv_services/test_run_io_multiple_dc_pods.py deleted file mode 100644 index 66c6804e74b..00000000000 --- a/tests/functional/pv/pv_services/test_run_io_multiple_dc_pods.py +++ /dev/null @@ -1,73 +0,0 @@ -import pytest -from ocs_ci.ocs.resources.pod import get_fio_rw_iops -from ocs_ci.ocs import constants -from ocs_ci.framework.pytest_customization.marks import green_squad -from ocs_ci.framework.testlib import ManageTest, tier2 - - -@green_squad -@tier2 -@pytest.mark.parametrize( - argnames=["interface"], - argvalues=[ - pytest.param( - constants.CEPHBLOCKPOOL, marks=pytest.mark.polarion_id("OCS-1284") - ), - pytest.param( - constants.CEPHFILESYSTEM, marks=pytest.mark.polarion_id("OCS-1285") - ), - ], -) -class TestRunIOMultipleDcPods(ManageTest): - """ - Run IO on multiple dc pods in parallel - - Steps: - 1:- Create project - 2:- Create serviceaccount - 3:- Add serviceaccount user to privileged policy - 4:- Create storageclass - 5:- Create PVC - 6:- Create pod with kind deploymentconfig - 7:- Add serviceaccount in yaml - 8:- Add privileged as True under securityContext - 9:- Deploy yaml using oc create -f yaml_name - 10:- oc get pods -n namespace - 11:- 2 pods will be Running for 1 deploymentconfig first will be deploy pod which actual deploys dc - and second pod will be actual deployed pod - 12:- For Deletion - 13:- oc get deploymentconfig -n namespace - 14:- get dc name and delete using oc delete deploymentconfig -n namespace - - Note:- Step 1,2,3,7 are not required if we deploy dc in openshift-storage namespace - """ - - num_of_pvcs = 10 - pvc_size = 5 - - @pytest.fixture() - def dc_pods(self, interface, multi_pvc_factory, dc_pod_factory): - """ - Prepare multiple dc pods for the test - - Returns: - list: Pod instances - """ - pvc_objs = multi_pvc_factory( - interface=interface, size=self.pvc_size, num_of_pvc=self.num_of_pvcs - ) - - dc_pod_objs = list() - for pvc_obj in pvc_objs: - dc_pod_objs.append(dc_pod_factory(pvc=pvc_obj)) - return dc_pod_objs - - def test_run_io_multiple_dc_pods(self, dc_pods): - """ - Run IO on multiple dc pods in parallel - """ - for dc_pod in dc_pods: - dc_pod.run_io("fs", f"{self.pvc_size - 1}G") - - for dc_pod in dc_pods: - get_fio_rw_iops(dc_pod) diff --git a/tests/functional/pv/pv_services/test_run_io_multiple_pods.py b/tests/functional/pv/pv_services/test_run_io_multiple_pods.py index 0530f60d120..2e0d7c61a11 100644 --- a/tests/functional/pv/pv_services/test_run_io_multiple_pods.py +++ b/tests/functional/pv/pv_services/test_run_io_multiple_pods.py @@ -1,4 +1,5 @@ import pytest + from ocs_ci.ocs.resources.pod import get_fio_rw_iops from ocs_ci.ocs import constants from ocs_ci.framework.pytest_customization.marks import green_squad, provider_mode @@ -22,11 +23,11 @@ class TestIOMultiplePods(ManageTest): Run IO on multiple pods in parallel """ - num_of_pvcs = 10 + num_of_pvcs = 6 pvc_size = 5 @pytest.fixture() - def pods(self, interface, pod_factory, multi_pvc_factory): + def pods(self, interface, multi_pvc_factory, pod_factory, dc_pod_factory): """ Prepare multiple pods for the test @@ -39,8 +40,12 @@ def pods(self, interface, pod_factory, multi_pvc_factory): ) pod_objs = list() - for pvc_obj in pvc_objs: - pod_objs.append(pod_factory(pvc=pvc_obj)) + for pvc_obj in pvc_objs[: len(pvc_objs) // 2]: + pod_objs.append(dc_pod_factory(interface=interface, pvc=pvc_obj)) + + for pvc_obj in pvc_objs[len(pvc_objs) // 2 :]: + pod_objs.append(pod_factory(interface=interface, pvc=pvc_obj)) + return pod_objs def test_run_io_multiple_pods(self, pods): @@ -48,7 +53,7 @@ def test_run_io_multiple_pods(self, pods): Run IO on multiple pods in parallel """ for pod in pods: - pod.run_io("fs", f"{self.pvc_size - 1}G") + pod.run_io(storage_type="fs", size="1G") for pod in pods: get_fio_rw_iops(pod) diff --git a/tests/functional/ui/test_pvc_ui.py b/tests/functional/ui/test_pvc_ui.py index c25c2ade3eb..247127fc156 100644 --- a/tests/functional/ui/test_pvc_ui.py +++ b/tests/functional/ui/test_pvc_ui.py @@ -200,7 +200,12 @@ def test_create_resize_delete_pvc( else: storage_type = constants.WORKLOAD_STORAGE_TYPE_FS - new_pod.run_io(storage_type, size=(new_size - 1), invalidate=0, rate="1000m") + new_pod.run_io( + storage_type, + size=(new_size - 1), + invalidate=0, + direct=int(storage_type == "block"), + ) get_fio_rw_iops(new_pod) logger.info("FIO execution on Pod successfully completed..!!")