pmorie / osb-broker-lib

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

UpdateInstance does not correctly deserialize into osb.UpdateInstanceRequest #19

Closed pmorie closed 6 years ago

pmorie commented 6 years ago

Looks like fields are blank:

--- FAIL: TestUpdateInstance (0.01s)                                                                     
    --- PASS: TestUpdateInstance/version_validation_error (0.00s)                                        
    --- FAIL: TestUpdateInstance/returns_errors.New (0.00s)                                              
        update_instance_test.go:118: unexpected request; expected &{12345 true 12345 <nil> map[] <nil> map[] 0xc4203fc600}, got &{ false  <nil> map[] <nil> map[] 0xc4200d7ce0} 
pmorie commented 6 years ago

I'm looking at this now

jmrodri commented 6 years ago

Should be the same issue. You can't use mux.Vars for query params. All r.URL.Query() should be r.FormValue and mux.Vars should only be used for variables on the URL.

/path/to/:somevar/entity?:queryParam1&queryparam2

mux.Vars can be used to get :somevar but NOT queryParam1 or queryParam2.

lilic commented 6 years ago

@pmorie Are you still working on this? Otherwise I can also take care of fixing the rest of the issue with the params.

pmorie commented 6 years ago

Sorry, I'm not looking at it at this point, feel free @LiliC

n3wscott commented 6 years ago

I bet it is related to this issue: https://github.com/pmorie/osb-broker-lib/issues/34