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

HTTP malformed response testing #2334

Open
david-perez opened this issue Jun 20, 2024 · 0 comments
Open

HTTP malformed response testing #2334

david-perez opened this issue Jun 20, 2024 · 0 comments

Comments

@david-perez
Copy link
Contributor

@httpRequestTests and @httpResponseTests are dual in that params is either the provided input to the test, or the expected output one should assert against, depending on whether you're generating a client or a server:

  • in @httpRequestTests:
    • clients assert that they serialize an HTTP request given params
    • servers assert that they deserialize params given an HTTP request.
  • in @httpResponseTests:
    • clients assert that they deserialize params given an HTTP response.
    • servers assert that they serialize an HTTP response given params

@httpMalformedRequestTests only make sense for servers. Servers assert that they reject a malformed request with the expected HTTP response.

The dual, @httpMalformedResponseTests, is missing, and would be very handy for clients. Clients would assert that they reject a malformed response with an expected error message.

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

No branches or pull requests

1 participant