From 8a1c795aabc3ab6fcc4cd199621bb16414f5fc1c Mon Sep 17 00:00:00 2001 From: Avdhoot Date: Mon, 18 Nov 2024 20:40:58 +0530 Subject: [PATCH] changed fixure structure Signed-off-by: Avdhoot --- tests/conftest.py | 15 +++++++++++++++ tests/functional/test_vms.py | 20 +++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 12b26b75b872..93b4c4066953 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7063,6 +7063,21 @@ def factory(namespace=None): "access_mode": constants.ACCESS_MODE_RWX, "sc_name": sc_obj_def_compr.name, }, + { + "volume_interface": "PVC", + "access_mode": constants.ACCESS_MODE_RWX, + "sc_name": sc_obj_aggressive.name, + }, + { + "volume_interface": "DVT", + "access_mode": constants.ACCESS_MODE_RWX, + "sc_name": sc_obj_def_compr.name, + }, + { + "volume_interface": "DVT", + "access_mode": constants.ACCESS_MODE_RWX, + "sc_name": sc_obj_aggressive.name, + }, ] # Create ceph-csi-kms-token in the tenant namespace diff --git a/tests/functional/test_vms.py b/tests/functional/test_vms.py index efe7011044a6..728d93171622 100644 --- a/tests/functional/test_vms.py +++ b/tests/functional/test_vms.py @@ -1,4 +1,5 @@ import logging +import pytest from ocs_ci.framework.testlib import E2ETest logger = logging.getLogger(__name__) @@ -7,20 +8,25 @@ class TestCNVVM(E2ETest): """ Includes tests related to CNV workloads on MDR environment. - """ - def test_cnv_vms(self, multi_cnv_workload, project_factory): - """ - Tests to verify configuration for non-GS like environment + """ - """ + @pytest.fixture(autouse=True) + def setup(self, project_factory, multi_cnv_workload): # Create a project proj_obj = project_factory() + self.vm_objs = multi_cnv_workload(namespace=proj_obj.namespace) - vm_objs = multi_cnv_workload(namespace=proj_obj.namespace) + logger.info("All vms created successfully") + + def test_cnv_vms(self, setup): + """ + Tests to verify configuration for non-GS like environment + + """ - logger.info(f"All vm object: {vm_objs}") + logger.info("PASS") # 1. if os os windows then check rxbounce enabled in sc yaml # 2. verify replication is 3 for all vms