Skip to content

Commit

Permalink
Add GetRawParameters method on UpdateDetails struct (#91)
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Szostok <[email protected]>
  • Loading branch information
mszostok authored and blgm committed Oct 29, 2019
1 parent f3efa40 commit 35d359e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,10 @@ var _ = Describe("Service Broker API", func() {
})

It("calls update with details with raw context", func() {
Expect(fakeServiceBroker.UpdateDetails.RawContext).To(
Equal(json.RawMessage(`{"new-context":"new-context-value"}`)),
detailsWithRawContext := brokerapi.DetailsWithRawContext(fakeServiceBroker.UpdateDetails)
rawContext := detailsWithRawContext.GetRawContext()
Expect(string(rawContext)).To(
MatchJSON(`{"new-context":"new-context-value"}`),
)
})

Expand Down
4 changes: 4 additions & 0 deletions domain/service_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ func (d BindDetails) GetRawParameters() json.RawMessage {
return d.RawParameters
}

func (d UpdateDetails) GetRawContext() json.RawMessage {
return d.RawContext
}

func (d UpdateDetails) GetRawParameters() json.RawMessage {
return d.RawParameters
}
Expand Down

0 comments on commit 35d359e

Please sign in to comment.