Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
TalShorSap committed Aug 22, 2023
1 parent 07724a3 commit c99a7fa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions controllers/serviceinstance_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,17 @@ var _ = Describe("ServiceInstance controller", func() {
It("should update in progress condition and afterwards failure condition", func() {
serviceInstance = createInstance(ctx, instanceSpec, false)
fakeClient.StatusReturns(&smclientTypes.Operation{
ID: "1234",
Type: smClientTypes.CREATE,
State: smClientTypes.FAILED,
ID: "1234",
Type: smClientTypes.CREATE,
State: smClientTypes.FAILED,
Errors: []byte(`{"error": "brokerError","description":"broker-failure"}`),
}, nil)
Eventually(func() bool {
_ = k8sClient.Get(ctx, defaultLookupKey, serviceInstance)
return isFailed(serviceInstance)
}, timeout, interval).Should(BeTrue())

Expect(serviceInstance.Status.Conditions[0].Message).To(ContainSubstring("broker-failure"))
})
})

Expand Down

0 comments on commit c99a7fa

Please sign in to comment.