We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 747d23b + fad84c3 commit db7f8b8Copy full SHA for db7f8b8
tests/integration/api_volume_test.py
@@ -17,10 +17,16 @@ def test_create_volume(self):
17
assert result['Driver'] == 'local'
18
19
def test_create_volume_invalid_driver(self):
20
- driver_name = 'invalid.driver'
+ # special name to avoid exponential timeout loop
21
+ # https://github.com/moby/moby/blob/9e00a63d65434cdedc444e79a2b33a7c202b10d8/pkg/plugins/client.go#L253-L254
22
+ driver_name = 'this-plugin-does-not-exist'
23
- with pytest.raises(docker.errors.NotFound):
24
+ with pytest.raises(docker.errors.APIError) as cm:
25
self.client.create_volume('perfectcherryblossom', driver_name)
26
+ assert (
27
+ cm.value.response.status_code == 404 or
28
+ cm.value.response.status_code == 400
29
+ )
30
31
def test_list_volumes(self):
32
name = 'imperishablenight'
0 commit comments