Skip to content

Commit

Permalink
Adjust tests for deletion of NF MW after unfence
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Gershkovich <[email protected]>
  • Loading branch information
ELENAGER authored and BenamarMk committed Jun 6, 2024
1 parent 716c02d commit 383a85d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions controllers/drplacementcontrol_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1467,12 +1467,16 @@ func runFailoverAction(placementObj client.Object, fromCluster, toCluster string
// resource is cleaned up or not, number of MW may change.
if !isSyncDR {
Expect(getManifestWorkCount(toCluster)).Should(BeElementOf(3, 4)) // MW for VRG+DRCluster+NS
Expect(getManifestWorkCount(fromCluster)).Should(Equal(2)) // DRCluster + NS MW
} else {
Expect(getManifestWorkCount(toCluster)).Should(Equal(4)) // MW for VRG+DRCluster + NS + NF
Expect(getManifestWorkCount(fromCluster)).Should(Equal(2)) // NS + DRCluster MW
if manualFence {
Expect(getManifestWorkCount(toCluster)).Should(Equal(3)) // MW for VRG+DRCluster + NS
} else {
Expect(getManifestWorkCount(toCluster)).Should(Equal(4)) // MW for VRG+DRCluster + NS + NF
}
}

Expect(getManifestWorkCount(fromCluster)).Should(Equal(2)) // DRCluster + NS MW

drpc := getLatestDRPC(placementObj.GetNamespace())
// At this point expect the DRPC status condition to have 2 types
// {Available and PeerReady}
Expand Down Expand Up @@ -1700,7 +1704,7 @@ func verifyFailoverToSecondary(placementObj client.Object, toCluster string,
// MW for VRG+NS+DRCluster
Eventually(getManifestWorkCount, timeout, interval).WithArguments(toCluster).Should(BeElementOf(3, 4))
} else {
Expect(getManifestWorkCount(toCluster)).Should(Equal(4)) // MW for VRG+NS+DRCluster+NF
Expect(getManifestWorkCount(toCluster)).Should(BeElementOf(3, 4)) // MW for VRG+NS+DRCluster+NF
}

Expect(getManifestWorkCount(East1ManagedCluster)).Should(Equal(2)) // DRClustern+NS
Expand Down

0 comments on commit 383a85d

Please sign in to comment.