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 a way to return the body of a 5xx response. #484

Merged
merged 4 commits into from
Oct 25, 2018

Conversation

porridge
Copy link
Contributor

Fixes: #479
Signed-off-by: Marcin Owsiany [email protected]

cc @krasi-georgiev

api/prometheus/v1/api_test.go Outdated Show resolved Hide resolved
api/prometheus/v1/api_test.go Outdated Show resolved Hide resolved
api/prometheus/v1/api_test.go Outdated Show resolved Hide resolved
Signed-off-by: Marcin Owsiany <[email protected]>
@porridge
Copy link
Contributor Author

Changes pushed, PTAL @krasi-georgiev

Without t.Run() it is very hard to figure out which test in a table has
failed.

Signed-off-by: Marcin Owsiany <[email protected]>
Copy link
Contributor

@krasi-georgiev krasi-georgiev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep that is more logical, thanks!
I think after few small changes it is ready.

btw I find the tests very hard to follow and I think the https://golang.org/pkg/net/http/httptest/ should help to refactor and simplify these, but is a story for another PR for #485.

api/prometheus/v1/api.go Show resolved Hide resolved
api/prometheus/v1/api_test.go Outdated Show resolved Hide resolved
api/prometheus/v1/api_test.go Outdated Show resolved Hide resolved
Signed-off-by: Marcin Owsiany <[email protected]>
@porridge
Copy link
Contributor Author

All done and pushed, PTAL.

@krasi-georgiev krasi-georgiev merged commit f30f428 into prometheus:master Oct 25, 2018
@krasi-georgiev
Copy link
Contributor

Thanks!
Here is the issue if someone wants to try and simplify these tests to make easier to follow. #479

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

Successfully merging this pull request may close these issues.

2 participants