Regression 443 test: relax status-code check#2216
Conversation
tests/integration/regression_test.py
Outdated
| for line in self.client.build(fileobj=dfile, tag="a/b/c"): | ||
| pass | ||
| assert exc.value.response.status_code == 500 | ||
| assert exc.value.response.is_error |
There was a problem hiding this comment.
specifically I think this should be assert exc.value.is_error()
There was a problem hiding this comment.
ah, dang; let me update 😅 - I'm really bad at python
There was a problem hiding this comment.
Updated; also happy to remove the new is_error if you think we should just inline it here
9797959 to
9387c7d
Compare
tests/integration/regression_test.py
Outdated
| for line in self.client.build(fileobj=dfile, tag="a/b/c"): | ||
| pass | ||
| assert exc.value.response.status_code == 500 | ||
| assert exc.value.response.is_error() |
There was a problem hiding this comment.
Removing .response should clear up the CI failure
There was a problem hiding this comment.
🤦♂️ updated again; thanks for bearing with me 🤗
|
Failure on 2.7 is unrelated to this PR and probably needs some dependency wrangling, I'll have to take a closer look. |
9387c7d to
1992c23
Compare
This test was testing for a 500 status, but this status is actually a bug in the API (as it's due to an invalid request), and the API should actually return a 400 status. To make this test handle both situations, relax the test to accept either a 4xx or 5xx status. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1992c23 to
219c521
Compare
|
Is this expected? (https://jenkins.dockerproject.org/job/docker/job/docker-py/job/PR-2216/4/execution/node/25/log/) |
This test was testing for a 500 status, but this status is actually a bug in the API (as it's due to an invalid request), and the API should actually return a 400 status.
To make this test handle both situations, relax the test to accept either a 4xx or 5xx status.
relates to moby/moby#38487 (comment)
@shin- @LinuxMercedes