-
Notifications
You must be signed in to change notification settings - Fork 36
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
CI Testing for Dataplane #912
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vrmiguel
reviewed
Aug 22, 2024
|
||
let resp = test::call_service(&app, req).await; | ||
|
||
assert!(resp.status().is_success(), "Response status is not successful: {:?}", resp.status()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
assert!(resp.status().is_success(), "Response status is not successful: {:?}", resp.status()); | |
let status_code = resp.status(); | |
if status_code.is_success().not() { | |
let bytes = test::read_body(resp).await; | |
let msg = str::from_utf8(&bytes).unwrap(); | |
panic!("Request failed: {} - {msg}", status_code.as_u16()) | |
} |
I'd suggest something like this so we know what the actual error is
vrmiguel
requested review from
nhudson,
ianstanton and
ChuckHend
as code owners
August 23, 2024 15:49
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.