Skip to content

Commit

Permalink
Test Verify hub restore to passive hub following failover and relocat…
Browse files Browse the repository at this point in the history
…e of app

Signed-off-by: Akarsha-rai <[email protected]>
  • Loading branch information
Akarsha-rai committed Jul 29, 2024
1 parent 0da5af9 commit b6fa6fa
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def test_application_failover_and_relocate(

# Deploy applications on managed clusters
# ToDO: deploy application on both managed clusters
workloads = dr_workload(num_of_subscription=1, num_of_appset=1)
workloads = dr_workload(
num_of_subscription=1, num_of_appset=1, switch_ctx=get_passive_acm_index()
)
self.namespace = workloads[0].workload_namespace

# Create application on Primary managed cluster
Expand Down Expand Up @@ -145,10 +147,10 @@ def test_application_failover_and_relocate(
"All nodes from active hub zone are powered off, "
f"wait {wait_time} seconds before restoring in passive hub"
)
time.sleep(wait_time)

# Restore new hub
restore_backup()
wait_time = 300
logger.info(f"Wait {wait_time} until restores are taken ")
time.sleep(wait_time)

Expand Down Expand Up @@ -217,6 +219,9 @@ def test_application_failover_and_relocate(
failover_cluster=secondary_cluster_name,
namespace=wl.workload_namespace,
workload_type=wl.workload_type,
workload_placement_name=wl.appset_placement_name
if wl.workload_type != constants.SUBSCRIPTION
else None,
switch_ctx=get_passive_acm_index(),
)
)
Expand Down Expand Up @@ -318,6 +323,9 @@ def test_application_failover_and_relocate(
preferred_cluster=self.primary_cluster_name,
namespace=wl.workload_namespace,
workload_type=wl.workload_type,
workload_placement_name=wl.appset_placement_name
if wl.workload_type != constants.SUBSCRIPTION
else None,
switch_ctx=get_passive_acm_index(),
)
)
Expand Down

0 comments on commit b6fa6fa

Please sign in to comment.