Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full stack HTTP tests #28

Open
jwalgran opened this issue Jul 29, 2014 · 2 comments
Open

Add full stack HTTP tests #28

jwalgran opened this issue Jul 29, 2014 · 2 comments

Comments

@jwalgran
Copy link
Contributor

We should have a few small tests that hit a fully running service to exercise the HTTP pipeline.

@steventlamb
Copy link
Contributor

@jwalgran are you picturing something in the style of a 2-thread LiveServerTestCase making network requests, or an all-go solution that tests requests and response? The former sounds like a lot of work without a solution to grab off the shelf. The latter is well covered here:
http://golang.org/pkg/net/http/httptest/#ResponseRecorder
The latter would probably make this a duplicate of #25

@jwalgran
Copy link
Contributor Author

The existing title and description may not be accurately capturing what we really need. Any set of REST services needs coverage around the interface to protect against regression. The three things we
should strive to do are:

  1. Assert the existence/names of all the endpoints.
  2. Assert the shape and behavior of the request bodies and query
    string parameters.
  3. Assert the shape of the JSON responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants