pmorie / osb-broker-lib

A go library for developing an Open Service Broker
Apache License 2.0
28 stars 23 forks source link

DeprovisionHandler does not pass on correct arguments #8

Closed lilic closed 6 years ago

lilic commented 6 years ago

While unpacking deprovision request we seem to not set the PlanID and InstanceID correctly and they are empty when we send them along to the broker.

We do receive all the data but are not there after they are unpacked: https://github.com/pmorie/osb-broker-lib/blob/d83ef6a72ace103a0cfcaacebb36447c01996812/pkg/rest/apisurface.go#L173

because of this when we set them in the following lines they are not there: https://github.com/pmorie/osb-broker-lib/blob/d83ef6a72ace103a0cfcaacebb36447c01996812/pkg/rest/apisurface.go#L174-L176

cc @pmorie

jmrodri commented 6 years ago

I can look at this, we had a similar problem with our Automation Broker.

pmorie commented 6 years ago

This should be coming from the r.URL.Query().Get instead of the mux vars.

lilic commented 6 years ago

@jmrodri Sure, that would be great! Think we just need to get osbRequest.ServiceID and the osbRequest.PlanID as @pmorie said from the query params instead.

pmorie commented 6 years ago

@jmrodri feel free to take this one

Looking at the tests, it looks like the tests don't make assertions about what is passed to the BusinessLogic methods, so we should add some test coverage for this.

jmrodri commented 6 years ago

https://github.com/pmorie/osb-broker-lib/pull/10

jmrodri commented 6 years ago

There are other places that need fixing, I will create a new more general issue for them.

jmrodri commented 6 years ago

This should be fixed, not sure why it wasn't auto closed by the fixes comment in PR #10

pmorie commented 6 years ago

The comment has to be in the description.