Skip to content

Commit

Permalink
Improve getting vrg name for Discovered Apps
Browse files Browse the repository at this point in the history
Signed-off-by: prsurve <[email protected]>
  • Loading branch information
prsurve committed Jan 22, 2025
1 parent 1eea668 commit 0217e99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ocs_ci/helpers/dr_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,11 @@ def check_vrg_state(state, namespace, resource_name=""):
bool: True if VRG is in expected state or was deleted, False otherwise
"""
vrg_obj = ocp.OCP(kind=constants.VOLUME_REPLICATION_GROUP, namespace=namespace, resource_name=resource_name)
vrg_obj = ocp.OCP(
kind=constants.VOLUME_REPLICATION_GROUP,
namespace=namespace,
resource_name=resource_name,
)
if resource_name:
vrg_list = vrg_obj.get()
else:
Expand Down Expand Up @@ -626,7 +630,7 @@ def wait_for_replication_resources_creation(
func=check_vrg_state,
state="primary",
namespace=vrg_namespace,
resource_name=vrg_name
resource_name=vrg_name,
)
if not sample.wait_for_func_status(result=True):
error_msg = "VRG hasn't reached expected state primary within the time limit."
Expand Down Expand Up @@ -683,7 +687,7 @@ def wait_for_replication_resources_deletion(
func=check_vrg_state,
state="secondary",
namespace=vrg_namespace,
resource_name=vrg_name
resource_name=vrg_name,
)
if not sample.wait_for_func_status(result=True):
error_msg = (
Expand Down
2 changes: 1 addition & 1 deletion ocs_ci/ocs/dr/dr_workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ def verify_workload_deployment(self):
self.workload_pod_count,
self.workload_namespace,
discovered_apps=True,
vrg_name=self.discovered_apps_placement_name
vrg_name=self.discovered_apps_placement_name,
)

def create_placement(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_failover_and_relocate_discovered_apps(self, discovered_apps_dr_workload
rdr_workload.workload_pod_count,
rdr_workload.workload_namespace,
discovered_apps=True,
vrg_name=rdr_workload.discovered_apps_placement_name
vrg_name=rdr_workload.discovered_apps_placement_name,
)

# Doing Relocate
Expand Down

0 comments on commit 0217e99

Please sign in to comment.