Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions internal/controllers/topology/cluster/reconcile_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3662,7 +3662,8 @@ func TestReconcileState(t *testing.T) {
g.Expect(got.Spec.InfrastructureRef.IsDefined()).To(BeTrue())
g.Expect(got.Spec.ControlPlaneRef.IsDefined()).To(BeFalse())

g.Expect(env.CleanupAndWait(ctx, infrastructureCluster, currentCluster, clusterClass, ict, cpt)).To(Succeed())
g.Expect(env.CleanupAndWait(ctx, currentCluster)).To(Succeed())
g.Expect(env.CleanupAndWait(ctx, infrastructureCluster, clusterClass, ict, cpt)).To(Succeed())
})
t.Run("Cluster get reconciled with both infrastructure Ref and control plane ref when both reconcileInfrastructureCluster and reconcileControlPlane pass", func(t *testing.T) {
g := NewWithT(t)
Expand Down Expand Up @@ -3722,7 +3723,8 @@ func TestReconcileState(t *testing.T) {
g.Expect(got.Spec.InfrastructureRef.IsDefined()).To(BeTrue())
g.Expect(got.Spec.ControlPlaneRef.IsDefined()).To(BeTrue())

g.Expect(env.CleanupAndWait(ctx, infrastructureCluster, controlPlane, currentCluster, clusterClass, ict, cpt)).To(Succeed())
g.Expect(env.CleanupAndWait(ctx, currentCluster)).To(Succeed())
g.Expect(env.CleanupAndWait(ctx, infrastructureCluster, controlPlane, clusterClass, ict, cpt)).To(Succeed())
})
t.Run("Cluster does not get reconciled when reconcileControlPlane fails and infrastructure Ref is set", func(t *testing.T) {
g := NewWithT(t)
Expand Down