diff --git a/internal/controller/fluxinstance_controller_test.go b/internal/controller/fluxinstance_controller_test.go index 2592e66..3596745 100644 --- a/internal/controller/fluxinstance_controller_test.go +++ b/internal/controller/fluxinstance_controller_test.go @@ -181,15 +181,16 @@ func TestFluxInstanceReconciler_LifeCycle(t *testing.T) { // Check if events were recorded for each step. events := getEvents(result.Name) - g.Expect(events).To(HaveLen(4)) - g.Expect(events[0].Reason).To(Equal(meta.ProgressingReason)) - g.Expect(events[0].Message).To(HavePrefix("Installing")) - g.Expect(events[1].Reason).To(Equal(meta.ReconciliationSucceededReason)) - g.Expect(events[1].Message).To(HavePrefix("Reconciliation finished")) - g.Expect(events[2].Reason).To(Equal(meta.ProgressingReason)) - g.Expect(events[2].Message).To(HavePrefix("Upgrading")) - g.Expect(events[3].Reason).To(Equal(meta.ReconciliationSucceededReason)) - g.Expect(events[3].Annotations).To(HaveKeyWithValue(fluxcdv1.RevisionAnnotation, resultFinal.Status.LastAppliedRevision)) + g.Expect(events).To(HaveLen(5)) + g.Expect(events[0].Reason).To(Equal(fluxcdv1.OutdatedReason)) + g.Expect(events[1].Reason).To(Equal(meta.ProgressingReason)) + g.Expect(events[1].Message).To(HavePrefix("Installing")) + g.Expect(events[2].Reason).To(Equal(meta.ReconciliationSucceededReason)) + g.Expect(events[2].Message).To(HavePrefix("Reconciliation finished")) + g.Expect(events[3].Reason).To(Equal(meta.ProgressingReason)) + g.Expect(events[3].Message).To(HavePrefix("Upgrading")) + g.Expect(events[4].Reason).To(Equal(meta.ReconciliationSucceededReason)) + g.Expect(events[4].Annotations).To(HaveKeyWithValue(fluxcdv1.RevisionAnnotation, resultFinal.Status.LastAppliedRevision)) err = testClient.Delete(ctx, obj) g.Expect(err).ToNot(HaveOccurred())