marpaia / chef-golang

Go library to interact with the Chef server API
Other
77 stars 32 forks source link

Tests test errror on http ops, but not response codes #18

Closed spheromak closed 10 years ago

spheromak commented 10 years ago

We should be testing responses here as well.

marpaia commented 10 years ago

I'm not sure if this is what you mean, but every HTTP response in the tests should call the responseBody helper in api.go (https://github.com/marpaia/chef-golang/blob/master/api.go#L493) which verifies that the status code is a 200.

spheromak commented 10 years ago

ah excellent. I brought this up cause the server returned an error, but that must have been a 200 response with a error body :| bleh