Skip to content

Commit

Permalink
tests: fix TestKonnectEntityReconcilers for KonnectGatewayControlPlane (
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek authored Oct 10, 2024
1 parent 90c50a3 commit 9d07ccb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/envtest/konnect_entities_gatewaycontrolplane_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,13 @@ var konnectGatewayControlPlaneTestCases = []konnectEntityReconcilerTestCase{
ID: lo.ToPtr("123467"),
},
},
nil)
nil,
).
// NOTE: UpdateControlPlane can be called depending on the order
// of the events in the queue: either the group itself or the member
// control plane can be created first.
Maybe()

// verify that mock SDK is called as expected.
t.Cleanup(func() {
require.True(t, sdk.ControlPlaneSDK.AssertExpectations(t))
Expand All @@ -330,6 +336,9 @@ var konnectGatewayControlPlaneTestCases = []konnectEntityReconcilerTestCase{
) {
return
}
assert.True(t, conditionsContainProgrammedTrue(cp.Status.Conditions),
"Programmed condition should be set and its status should be true",
)
assert.True(t, controllerutil.ContainsFinalizer(cp, konnect.KonnectCleanupFinalizer),
"Finalizer should be set on control plane",
)
Expand Down

0 comments on commit 9d07ccb

Please sign in to comment.