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

Use Status Code or golang variables #71

Open
laurentsenta opened this issue Jun 2, 2023 · 4 comments
Open

Use Status Code or golang variables #71

laurentsenta opened this issue Jun 2, 2023 · 4 comments

Comments

@laurentsenta
Copy link
Contributor

laurentsenta commented Jun 2, 2023

@hacdias raised a want to use http.StatusMovedPermanently instead of raw status code like 301
#58 (comment)

Creating an issue here to agree & then rename all the status code in a single PR if we want too.

@laurentsenta
Copy link
Contributor Author

I'm neutral:

  • named variables are more readable
  • but when you have an error in your tests, status code is 200, expected 301, it's easier to search for raw numbers in your codebase.

@laurentsenta
Copy link
Contributor Author

cc @lidel @galargh

@galargh
Copy link
Contributor

galargh commented Jun 5, 2023

I think we should do what's easier for test maintainers. Personally, I can go either way. One thing I'm wondering about - how do we refer to exit codes in spec? If it's only by numbers, then it might be slightly more straightforward for test writers to keep using numbers in gateway conformance too.

@hacdias
Copy link
Member

hacdias commented Jun 8, 2023

@galargh in the specification itself we do things like 404 Not Found. We always say the "{ Number } { Text }" AFAIK.

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