From 1743c7b9f200a4735b5961578b8eee7cb491cc24 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Fri, 21 Mar 2025 02:24:49 +0530 Subject: [PATCH] qa/workunits/rbd: fix and enable test_force_promote_before_initial_sync Signed-off-by: Prasanna Kumar Kalever --- qa/workunits/rbd/rbd_mirror_group_simple.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/qa/workunits/rbd/rbd_mirror_group_simple.sh b/qa/workunits/rbd/rbd_mirror_group_simple.sh index cd448b81cde..6a55391a1ed 100755 --- a/qa/workunits/rbd/rbd_mirror_group_simple.sh +++ b/qa/workunits/rbd/rbd_mirror_group_simple.sh @@ -2645,13 +2645,7 @@ test_force_promote_before_initial_sync() # check that latest snap is incomplete test_group_snap_sync_incomplete "${secondary_cluster}" "${pool}/${group0}" "${group_snap_id}" - # force promote the group on the secondary - TODO this should fail with a sensible error message - # need to fix the test to check for the failure - use expect_failure once the error message is known - # see https://ibm-systems-storage.slack.com/archives/C07J9Q2E268/p1741107842904719?thread_ts=1740716823.395479&cid=C07J9Q2E268 - mirror_group_promote "${secondary_cluster}" "${pool}/${group0}" '--force' - - # demote and try to resync again - mirror_group_demote "${secondary_cluster}" "${pool}/${group0}" + expect_failure "no initial group snapshot available" rbd --cluster=${secondary_cluster} mirror group promote ${pool}/${group0} --force mirror_group_resync ${secondary_cluster} ${pool}/${group0} start_mirrors "${secondary_cluster}" @@ -3343,7 +3337,7 @@ run_all_tests() #run_test_all_scenarios test_enable_mirroring_when_duplicate_group_and_images_exists run_test_all_scenarios test_odf_failover_failback run_test_all_scenarios test_resync_marker - #run_test_all_scenarios test_force_promote_before_initial_sync + run_test_all_scenarios test_force_promote_before_initial_sync run_test_all_scenarios test_image_snapshots_with_group # TODO next test fails as group name is incorrectly synced without a mirror group snapshot command #run_test_all_scenarios test_group_rename -- 2.39.5