diff --git a/controllers/controllers/services/instances/upsi/controller_test.go b/controllers/controllers/services/instances/upsi/controller_test.go index f9a98f775..53c6c0a5d 100644 --- a/controllers/controllers/services/instances/upsi/controller_test.go +++ b/controllers/controllers/services/instances/upsi/controller_test.go @@ -169,6 +169,16 @@ var _ = Describe("CFServiceInstance", func() { g.Expect(instance.Status.CredentialsObservedVersion).NotTo(Equal(secretVersion)) }).Should(Succeed()) }) + + It("sets the instance last operation update type", func() { + Eventually(func(g Gomega) { + g.Expect(adminClient.Get(ctx, client.ObjectKeyFromObject(instance), instance)).To(Succeed()) + g.Expect(instance.Status.LastOperation).To(Equal(services.LastOperation{ + Type: "update", + State: "succeeded", + })) + }).Should(Succeed()) + }) }) When("the credentials secret gets deleted", func() { @@ -196,24 +206,6 @@ var _ = Describe("CFServiceInstance", func() { }) }) - When("credentials observed version is not equal to the secret version", func() { - BeforeEach(func() { - Expect(k8s.Patch(ctx, adminClient, instance, func() { - instance.Status.CredentialsObservedVersion = "invalid-version" - })).To(Succeed()) - }) - - It("sets the instance last operation update type", func() { - Eventually(func(g Gomega) { - g.Expect(adminClient.Get(ctx, client.ObjectKeyFromObject(instance), instance)).To(Succeed()) - g.Expect(instance.Status.LastOperation).To(Equal(services.LastOperation{ - Type: "update", - State: "succeeded", - })) - }).Should(Succeed()) - }) - }) - When("the instance is deleted", func() { JustBeforeEach(func() { Expect(adminClient.Delete(ctx, instance)).To(Succeed())