mirror of https://github.com/docker/docker-py.git
Merge pull request #2382 from thaJeztah/fix_platform_tests
Adjust `--platform` tests for changes in docker engine
This commit is contained in:
commit
17c86429e4
|
@ -448,8 +448,10 @@ class BuildTest(BaseAPIIntegrationTest):
|
|||
for _ in stream:
|
||||
pass
|
||||
|
||||
assert excinfo.value.status_code == 400
|
||||
assert 'invalid platform' in excinfo.exconly()
|
||||
# Some API versions incorrectly returns 500 status; assert 4xx or 5xx
|
||||
assert excinfo.value.is_error()
|
||||
assert 'unknown operating system' in excinfo.exconly() \
|
||||
or 'invalid platform' in excinfo.exconly()
|
||||
|
||||
def test_build_out_of_context_dockerfile(self):
|
||||
base_dir = tempfile.mkdtemp()
|
||||
|
|
|
@ -69,8 +69,10 @@ class PullImageTest(BaseAPIIntegrationTest):
|
|||
with pytest.raises(docker.errors.APIError) as excinfo:
|
||||
self.client.pull('hello-world', platform='foobar')
|
||||
|
||||
assert excinfo.value.status_code == 500
|
||||
assert 'invalid platform' in excinfo.exconly()
|
||||
# Some API versions incorrectly returns 500 status; assert 4xx or 5xx
|
||||
assert excinfo.value.is_error()
|
||||
assert 'unknown operating system' in excinfo.exconly() \
|
||||
or 'invalid platform' in excinfo.exconly()
|
||||
|
||||
|
||||
class CommitTest(BaseAPIIntegrationTest):
|
||||
|
|
Loading…
Reference in New Issue