From a0a0f17dd7057c0bfbd161c7c2a8c78873b0beaa Mon Sep 17 00:00:00 2001 From: Sidhant Agrawal Date: Tue, 8 Oct 2024 11:19:44 +0530 Subject: [PATCH] Added new marker "rdr" for running RDR related tests Signed-off-by: Sidhant Agrawal --- ocs_ci/framework/pytest_customization/marks.py | 1 + pytest.ini | 1 + .../regional-dr/test_cnv_app_failover_and_relocate.py | 3 ++- .../functional/disaster-recovery/regional-dr/test_failover.py | 3 ++- .../regional-dr/test_failover_and_relocate.py | 3 ++- .../regional-dr/test_failover_and_relocate_discovered_apps.py | 3 ++- .../regional-dr/test_managed_cluster_node_failure.py | 3 ++- .../regional-dr/test_negative_failover_relocate_ui.py | 4 +++- .../test_node_operations_during_failover_relocate.py | 3 ++- .../regional-dr/test_rdr_monitoring_dashboard_ui.py | 2 ++ .../functional/disaster-recovery/regional-dr/test_relocate.py | 3 ++- .../disaster-recovery/regional-dr/test_sequential_failover.py | 3 ++- .../disaster-recovery/regional-dr/test_sequential_relocate.py | 3 ++- 13 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ocs_ci/framework/pytest_customization/marks.py b/ocs_ci/framework/pytest_customization/marks.py index 6e44a28e364..fe2867c86ec 100644 --- a/ocs_ci/framework/pytest_customization/marks.py +++ b/ocs_ci/framework/pytest_customization/marks.py @@ -88,6 +88,7 @@ bugzilla = pytest.mark.bugzilla jira = pytest.mark.jira acm_import = pytest.mark.acm_import +rdr = pytest.mark.rdr tier_marks = [ tier1, diff --git a/pytest.ini b/pytest.ini index d6c9275c094..e25fbc3eb3b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -63,6 +63,7 @@ markers = black_squad: marker for black squad yellow_squad: marker for yellow squad turquoise_squad: marker for turquoise squad + rdr: marker for RDR related tests ignore_owner: marker to ignore test during squad decorator check in pytest collection mcg: marker for MCG related tests rgw: marker for RGW related tests diff --git a/tests/functional/disaster-recovery/regional-dr/test_cnv_app_failover_and_relocate.py b/tests/functional/disaster-recovery/regional-dr/test_cnv_app_failover_and_relocate.py index f7a43aaedaf..df08a8b191a 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_cnv_app_failover_and_relocate.py +++ b/tests/functional/disaster-recovery/regional-dr/test_cnv_app_failover_and_relocate.py @@ -5,7 +5,7 @@ from ocs_ci.deployment.cnv import CNVInstaller from ocs_ci.framework import config -from ocs_ci.framework.pytest_customization.marks import tier1, turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, tier1, turquoise_squad from ocs_ci.helpers import dr_helpers from ocs_ci.helpers.cnv_helpers import run_dd_io from ocs_ci.ocs import constants @@ -17,6 +17,7 @@ logger = logging.getLogger(__name__) +@rdr @tier1 @turquoise_squad class TestCnvApplicationRDR: diff --git a/tests/functional/disaster-recovery/regional-dr/test_failover.py b/tests/functional/disaster-recovery/regional-dr/test_failover.py index 9a5382d89df..eb0718d94c8 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_failover.py +++ b/tests/functional/disaster-recovery/regional-dr/test_failover.py @@ -4,7 +4,7 @@ import pytest from ocs_ci.framework import config -from ocs_ci.framework.pytest_customization.marks import turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, turquoise_squad from ocs_ci.framework.testlib import acceptance, tier1 from ocs_ci.helpers import dr_helpers from ocs_ci.helpers.dr_helpers import ( @@ -32,6 +32,7 @@ polarion_id_primary_down = "OCS-4742" +@rdr @acceptance @tier1 @turquoise_squad diff --git a/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate.py b/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate.py index 2efe9c24019..09c44d81535 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate.py +++ b/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate.py @@ -4,7 +4,7 @@ import pytest from ocs_ci.framework import config -from ocs_ci.framework.pytest_customization.marks import turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, turquoise_squad from ocs_ci.framework.testlib import acceptance, tier1 from ocs_ci.helpers import dr_helpers from ocs_ci.helpers.dr_helpers_ui import ( @@ -34,6 +34,7 @@ # This test case is added in ODF 4.13 test plan. +@rdr @turquoise_squad @acceptance @tier1 diff --git a/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate_discovered_apps.py b/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate_discovered_apps.py index ae9dd32a5f3..3cd4b4b8b25 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate_discovered_apps.py +++ b/tests/functional/disaster-recovery/regional-dr/test_failover_and_relocate_discovered_apps.py @@ -4,13 +4,14 @@ from ocs_ci.framework import config from ocs_ci.framework.testlib import acceptance, tier1 -from ocs_ci.framework.pytest_customization.marks import turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, turquoise_squad from ocs_ci.helpers import dr_helpers logger = logging.getLogger(__name__) +@rdr @acceptance @tier1 @turquoise_squad diff --git a/tests/functional/disaster-recovery/regional-dr/test_managed_cluster_node_failure.py b/tests/functional/disaster-recovery/regional-dr/test_managed_cluster_node_failure.py index e7fe63607b1..a819b0241ae 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_managed_cluster_node_failure.py +++ b/tests/functional/disaster-recovery/regional-dr/test_managed_cluster_node_failure.py @@ -5,7 +5,7 @@ from ocs_ci.framework import config from ocs_ci.framework.testlib import tier4, tier4b -from ocs_ci.framework.pytest_customization.marks import turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, turquoise_squad from ocs_ci.helpers import dr_helpers from ocs_ci.helpers.helpers import run_cmd_verify_cli_output from ocs_ci.ocs import constants @@ -24,6 +24,7 @@ logger = logging.getLogger(__name__) +@rdr @tier4 @tier4b @turquoise_squad diff --git a/tests/functional/disaster-recovery/regional-dr/test_negative_failover_relocate_ui.py b/tests/functional/disaster-recovery/regional-dr/test_negative_failover_relocate_ui.py index 47ff8cfa42e..ca9d676b874 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_negative_failover_relocate_ui.py +++ b/tests/functional/disaster-recovery/regional-dr/test_negative_failover_relocate_ui.py @@ -5,11 +5,12 @@ from ocs_ci.framework import config from ocs_ci.framework.pytest_customization.marks import ( + rdr, rdr_ui_failover_config_required, rdr_ui_relocate_config_required, + turquoise_squad, ) from ocs_ci.framework.testlib import tier3, skipif_ocs_version -from ocs_ci.framework.pytest_customization.marks import turquoise_squad from ocs_ci.helpers import dr_helpers from ocs_ci.ocs import constants from ocs_ci.ocs.acm.acm import AcmAddClusters @@ -22,6 +23,7 @@ logger = logging.getLogger(__name__) +@rdr @tier3 @turquoise_squad @skipif_ocs_version("<4.13") diff --git a/tests/functional/disaster-recovery/regional-dr/test_node_operations_during_failover_relocate.py b/tests/functional/disaster-recovery/regional-dr/test_node_operations_during_failover_relocate.py index 4ba45c4e19d..bb671de174d 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_node_operations_during_failover_relocate.py +++ b/tests/functional/disaster-recovery/regional-dr/test_node_operations_during_failover_relocate.py @@ -4,7 +4,7 @@ import pytest from ocs_ci.framework import config -from ocs_ci.framework.testlib import tier4b, turquoise_squad +from ocs_ci.framework.testlib import rdr, tier4b, turquoise_squad from ocs_ci.helpers import dr_helpers from ocs_ci.ocs import constants, defaults from ocs_ci.ocs.node import ( @@ -20,6 +20,7 @@ logger = logging.getLogger(__name__) +@rdr @tier4b @turquoise_squad class TestNodeDrainDuringFailoverRelocate: diff --git a/tests/functional/disaster-recovery/regional-dr/test_rdr_monitoring_dashboard_ui.py b/tests/functional/disaster-recovery/regional-dr/test_rdr_monitoring_dashboard_ui.py index 59a69f2fa91..c1df35b4ef1 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_rdr_monitoring_dashboard_ui.py +++ b/tests/functional/disaster-recovery/regional-dr/test_rdr_monitoring_dashboard_ui.py @@ -6,6 +6,7 @@ from ocs_ci.framework import config from ocs_ci.framework.testlib import skipif_ocs_version, tier1 from ocs_ci.framework.pytest_customization.marks import ( + rdr, turquoise_squad, rdr_ui_failover_config_required, ) @@ -33,6 +34,7 @@ logger = logging.getLogger(__name__) +@rdr @tier1 @turquoise_squad @rdr_ui_failover_config_required diff --git a/tests/functional/disaster-recovery/regional-dr/test_relocate.py b/tests/functional/disaster-recovery/regional-dr/test_relocate.py index 584fda71f5e..fe719d0a205 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_relocate.py +++ b/tests/functional/disaster-recovery/regional-dr/test_relocate.py @@ -4,7 +4,7 @@ import pytest from ocs_ci.framework import config -from ocs_ci.framework.pytest_customization.marks import turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, turquoise_squad from ocs_ci.framework.testlib import acceptance, tier1 from ocs_ci.helpers import dr_helpers from ocs_ci.helpers.dr_helpers_ui import ( @@ -23,6 +23,7 @@ polarion_id_relocate = "OCS-4744" +@rdr @acceptance @tier1 @turquoise_squad diff --git a/tests/functional/disaster-recovery/regional-dr/test_sequential_failover.py b/tests/functional/disaster-recovery/regional-dr/test_sequential_failover.py index ce698da599a..c57c3b7c537 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_sequential_failover.py +++ b/tests/functional/disaster-recovery/regional-dr/test_sequential_failover.py @@ -6,7 +6,7 @@ from ocs_ci.framework import config from ocs_ci.framework.testlib import tier1 -from ocs_ci.framework.pytest_customization.marks import turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, turquoise_squad from ocs_ci.helpers import dr_helpers from ocs_ci.ocs.node import wait_for_nodes_status, get_node_objs from ocs_ci.ocs.resources.pod import wait_for_pods_to_be_running @@ -15,6 +15,7 @@ logger = logging.getLogger(__name__) +@rdr @tier1 @turquoise_squad class TestSequentialFailover: diff --git a/tests/functional/disaster-recovery/regional-dr/test_sequential_relocate.py b/tests/functional/disaster-recovery/regional-dr/test_sequential_relocate.py index 609803c4d99..86b9e11de01 100644 --- a/tests/functional/disaster-recovery/regional-dr/test_sequential_relocate.py +++ b/tests/functional/disaster-recovery/regional-dr/test_sequential_relocate.py @@ -6,12 +6,13 @@ from ocs_ci.framework import config from ocs_ci.framework.testlib import tier1 -from ocs_ci.framework.pytest_customization.marks import turquoise_squad +from ocs_ci.framework.pytest_customization.marks import rdr, turquoise_squad from ocs_ci.helpers import dr_helpers logger = logging.getLogger(__name__) +@rdr @tier1 @turquoise_squad @pytest.mark.polarion_id("OCS-4772")