Skip to content

Commit 88b0a1c

Browse files
authored
Merge pull request #606 from metskem/develop
change string compare for user provided services to a more robust Mat…
2 parents 653221b + a778d08 commit 88b0a1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

user_provided_services/lifecycle.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var _ = UserProvidedServicesDescribe("Service Instance Lifecycle", func() {
7171
instanceGUID := getGuidFor("service", instanceName)
7272
credentials := cf.Cf("curl", fmt.Sprintf("/v3/service_instances/%s/credentials", instanceGUID)).Wait()
7373
Expect(credentials).To(Exit(0), "failed to curl fetch credentials")
74-
Expect(credentials).To(Say(`"param1": "value"`))
74+
Expect(credentials.Out.Contents()).To(MatchJSON(`{"param1":"value"}`))
7575
})
7676

7777
It("can delete a service instance", func() {
@@ -106,7 +106,7 @@ var _ = UserProvidedServicesDescribe("Service Instance Lifecycle", func() {
106106
instanceGUID := getGuidFor("service", instanceName)
107107
credentials := cf.Cf("curl", fmt.Sprintf("/v3/service_instances/%s/credentials", instanceGUID)).Wait()
108108
Expect(credentials).To(Exit(0), "failed to curl fetch credentials")
109-
Expect(credentials).To(Say(`"param2": "newValue"`))
109+
Expect(credentials.Out.Contents()).To(MatchJSON(`{"param2":"newValue"}`))
110110
})
111111

112112
It("can update service tags", func() {
@@ -175,7 +175,7 @@ var _ = UserProvidedServicesDescribe("Service Instance Lifecycle", func() {
175175
detailsEndpoint := getBindingDetailsEndpoint(appGUID, serviceInstanceGUID)
176176

177177
fetchBindingDetails := cf.Cf("curl", detailsEndpoint).Wait()
178-
Expect(fetchBindingDetails).To(Say(`"username": "%s"`, username))
178+
Expect(fetchBindingDetails.Out.Contents()).To(MatchJSON(fmt.Sprintf(`{"credentials":{"username": "%s"}}`, username)))
179179
Expect(fetchBindingDetails).To(Exit(0), "failed to fetch binding details")
180180
})
181181

0 commit comments

Comments
 (0)