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

Simplify HTTP response assertions in tests #1992

Open
pleshakov opened this issue May 17, 2024 · 1 comment · May be fixed by #3142
Open

Simplify HTTP response assertions in tests #1992

pleshakov opened this issue May 17, 2024 · 1 comment · May be fixed by #3142
Labels
backlog Currently unprioritized work. May change with user feedback or as the product progresses. good first issue Good for newcomers tech-debt Short-term pain, long-term benefit tests Pull requests that update tests

Comments

@pleshakov
Copy link
Contributor

pleshakov commented May 17, 2024

In our tests, we often inspect the response of an HTTP request.

Example 1
https://github.com/nginxinc/nginx-gateway-fabric/blob/2cd63e7e82729bdccda445f44db2f8eaec00ba38/tests/suite/graceful_recovery_test.go#L220

Example 2
https://github.com/nginxinc/nginx-gateway-fabric/blob/2cd63e7e82729bdccda445f44db2f8eaec00ba38/tests/scale/scale_test.go#L250

Gomega provides matches for HTTP response -- https://onsi.github.io/gomega/#working-with-http-responses

Acceptance criteria:

  • Simplify response assertions by using Gomega specialized matchers.
@pleshakov pleshakov added the tests Pull requests that update tests label May 17, 2024
Copy link
Contributor

github-actions bot commented Jun 1, 2024

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale Pull requests/issues with no activity label Jun 1, 2024
@mpstefan mpstefan added tech-debt Short-term pain, long-term benefit backlog Currently unprioritized work. May change with user feedback or as the product progresses. and removed stale Pull requests/issues with no activity labels Jun 3, 2024
@kate-osborn kate-osborn added the good first issue Good for newcomers label Jan 28, 2025
@miledxz miledxz linked a pull request Feb 16, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Currently unprioritized work. May change with user feedback or as the product progresses. good first issue Good for newcomers tech-debt Short-term pain, long-term benefit tests Pull requests that update tests
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

3 participants