File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,16 @@ def test_create_volume(self):
17
17
assert result ['Driver' ] == 'local'
18
18
19
19
def test_create_volume_invalid_driver (self ):
20
- driver_name = 'invalid.driver'
20
+ # 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'
21
23
22
- with pytest .raises (docker .errors .NotFound ) :
24
+ with pytest .raises (docker .errors .APIError ) as cm :
23
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
+ )
24
30
25
31
def test_list_volumes (self ):
26
32
name = 'imperishablenight'
You can’t perform that action at this time.
0 commit comments