nginx-gateway-fabric
nginx-gateway-fabric copied to clipboard
Update simplified http response assertion
Proposed changes
Adding simplified http response assertion
Problem: Not using built in Gomega assertions
Solution: Using built in Gomega assertions
Here we explicitly returns nil, making it clear that if framework.Get does not fail, the function should not return an error. Expect will fail the test if conditions are not met, so returning err does not add value.
Closes #1992
- [x] I have read the CONTRIBUTING doc
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] I have checked that all unit tests pass after adding my changes
- [ ] I have updated necessary documentation
- [x] I have rebased my branch onto main
- [ ] I will ensure my PR is targeting the main branch and pulling from my branch from my own fork
Thanks @miledxz, I think there are a couple other locations in a few tests that can also be updated. If you do a search for http.StatusOK, that should help find them.
This PR 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.
This PR was closed because it has been stalled for 14 days with no activity.