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

feat(server): improve resource manager test suit debug output #2487

Merged
merged 2 commits into from
May 4, 2023

Conversation

schoren
Copy link
Collaborator

@schoren schoren commented May 4, 2023

This PR improves the resource manager reusable test suit. It dumps the http response when a test fails, so it's eaiser to understand why the test is not passing.

Example:

Screenshot 2023-05-04 at 15 30 09

Changes

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@schoren schoren marked this pull request as ready for review May 4, 2023 18:31
Comment on lines +16 to +27
func dumpResponseIfNot(t *testing.T, success bool, resp *http.Response) {
t.Helper()

if success {
return
}

b, _ := httputil.DumpResponse(resp, true)
t.Log("\n", string(b))
t.FailNow()
}

Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@schoren schoren merged commit 2e63053 into main May 4, 2023
@schoren schoren deleted the rm-test-debugging branch May 4, 2023 19:17
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