pmorie / osb-broker-lib

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

Unit test for unpackUpdateRequest #39

Closed lilic closed 6 years ago

lilic commented 6 years ago

As promised (https://github.com/pmorie/osb-broker-lib/pull/38) here is the unit test for the unpackUpdateRequest function. Let me know what you think about it? If you agree with it, we could add more tests scenarios, as well as test other unpack methods?

Had to make a change to the unpackUpdateRequest method, due to the mux.Vars holding global state, we instead pass the vars to the unpackUpdateRequest, and that way make it easier to test.

cc @pmorie @n3wscott @shawn-hurley @jmrodri