diff --git a/tests/conftest.py b/tests/conftest.py index 4eb338655b69..3a636ad1639b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6473,7 +6473,7 @@ def dr_workload(request): def factory( num_of_subscription=1, num_of_appset=0, - appset_model="pull", + appset_model=None, pvc_interface=constants.CEPHBLOCKPOOL, switch_ctx=None, ): @@ -6481,11 +6481,11 @@ def factory( Args: num_of_subscription (int): Number of Subscription type workload to be created num_of_appset (int): Number of ApplicationSet type workload to be created + appset_model (str): GitOps ApplicationSet deployment model. Valid values include "pull" or "push". + ODF 4.16 onwards, "pull" model is the default if not user-provided. pvc_interface (str): 'CephBlockPool' or 'CephFileSystem'. This decides whether a RBD based or CephFS based resource is created. RBD is default. switch_ctx (int): The cluster index by the cluster name - appset_model (str): Appset Gitops deployment now supports "pull" model starting ACM 2.10 which is now the - default selection in addition to "push" model. Raises: ResourceNotDeleted: In case workload resources not deleted properly @@ -6500,6 +6500,10 @@ def factory( if pvc_interface == constants.CEPHFILESYSTEM: workload_key = "dr_workload_subscription_cephfs" + if num_of_appset > 0 and appset_model is None: + ocs_version = version.get_semantic_ocs_version_from_config() + appset_model = "pull" if ocs_version >= version.VERSION_4_16 else "push" + for index in range(num_of_subscription): workload_details = ocsci_config.ENV_DATA[workload_key][index] workload = BusyBox( 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 a7cd6f463aea..e03da06f4d45 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 @@ -6,10 +6,7 @@ import pytest from ocs_ci.framework import config -from ocs_ci.framework.pytest_customization.marks import ( - turquoise_squad, - skipif_ocs_version, -) +from ocs_ci.framework.pytest_customization.marks import 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 ( @@ -32,8 +29,6 @@ polarion_id_primary_down = "OCS-4427" polarion_id_primary_down_appset = "OCS-5009" polarion_id_primary_up_appset = "OCS-5010" -polarion_id_primary_up_appset_pull = None -polarion_id_primary_down_appset_pull = None if config.RUN.get("rdr_failover_via_ui"): @@ -52,55 +47,31 @@ class TestFailoverAndRelocate: """ @pytest.mark.parametrize( - argnames=["workload_type", "primary_cluster_down", "appset_model"], + argnames=["workload_type", "primary_cluster_down"], argvalues=[ pytest.param( constants.SUBSCRIPTION, False, - None, marks=pytest.mark.polarion_id(polarion_id_primary_up), id="primary_up_subscription", ), pytest.param( constants.SUBSCRIPTION, True, - None, marks=pytest.mark.polarion_id(polarion_id_primary_down), id="primary_down_subscription", ), pytest.param( constants.APPLICATION_SET, False, - "push", marks=pytest.mark.polarion_id(polarion_id_primary_up_appset), - id="primary_up_appset_push", - ), - pytest.param( - constants.APPLICATION_SET, - False, - "pull", - marks=[ - pytest.mark.polarion_id(polarion_id_primary_up_appset_pull), - skipif_ocs_version("<4.16"), - ], - id="primary_up_appset_pull", + id="primary_up_appset", ), pytest.param( constants.APPLICATION_SET, True, - "push", marks=pytest.mark.polarion_id(polarion_id_primary_down_appset), - id="primary_down_appset_push", - ), - pytest.param( - constants.APPLICATION_SET, - True, - "pull", - marks=[ - pytest.mark.polarion_id(polarion_id_primary_down_appset_pull), - skipif_ocs_version("<4.16"), - ], - id="primary_down_appset_pull", + id="primary_down_appset", ), ], ) @@ -110,7 +81,6 @@ def test_failover_and_relocate( setup_acm_ui, dr_workload, workload_type, - appset_model, nodes_multicluster, node_restart_teardown, ): @@ -126,8 +96,6 @@ def test_failover_and_relocate( pass the yaml conf/ocsci/dr_ui.yaml to trigger it. The value of lastGroupSyncTime is verified in each stage. - appset_model pull type was introduced with ACM 2.10 and would be supported with ODF 4.16 and above - """ if config.RUN.get("rdr_failover_via_ui"): acm_obj = AcmAddClusters() @@ -136,9 +104,7 @@ def test_failover_and_relocate( rdr_workload = dr_workload(num_of_subscription=1)[0] drpc_obj = DRPC(namespace=rdr_workload.workload_namespace) else: - rdr_workload = dr_workload( - num_of_subscription=0, num_of_appset=1, appset_model=appset_model - )[0] + rdr_workload = dr_workload(num_of_subscription=0, num_of_appset=1)[0] drpc_obj = DRPC( namespace=constants.GITOPS_CLUSTER_NAMESPACE, resource_name=f"{rdr_workload.appset_placement_name}-drpc", @@ -230,11 +196,9 @@ def test_failover_and_relocate( secondary_cluster_name, rdr_workload.workload_namespace, workload_type, - ( - rdr_workload.appset_placement_name - if workload_type != constants.SUBSCRIPTION - else None - ), + rdr_workload.appset_placement_name + if workload_type != constants.SUBSCRIPTION + else None, ) # Verify resources creation on secondary cluster (failoverCluster) @@ -338,11 +302,9 @@ def test_failover_and_relocate( primary_cluster_name, rdr_workload.workload_namespace, workload_type, - ( - rdr_workload.appset_placement_name - if workload_type != constants.SUBSCRIPTION - else None - ), + rdr_workload.appset_placement_name + if workload_type != constants.SUBSCRIPTION + else None, ) # Verify resources deletion from secondary cluster