issue #1948, added testing code to test go api#2532
issue #1948, added testing code to test go api#2532wing328 merged 4 commits intoswagger-api:masterfrom
Conversation
|
@guohuang thanks for the PR. I think that's better than what we currently have. To make it even better, I would suggest using For other languages (e.g. Ruby), we do check each field from the returned object, e.g. https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/ruby/spec/pet_spec.rb#L73 |
|
@wing328 thanks for your suggestion, i have added btw, do you expect me to write similar tests for the store and user api as well? |
|
@guohuang thanks for the quick turnaround. Let me have a look at the Petstore test later today. I do not expect you to do so. Later we can add more test cases if needed. Your work is a good reference that other Go contributors can easily follow. |
|
The issue with the failed test cases is related to the spec and it's addressed in #2542 (merged into master). Please pull the latest master when you've a chance. |
#1948
@wing328 i don't know if this is what you want, it is very similar to the test.go, please take a look
the swagger.io api
http://petstore.swagger.io/v2/petsdoes not return anything which causing the tests failed.here is the test result
