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):
1717 assert result ['Driver' ] == 'local'
1818
1919 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'
2123
22- with pytest .raises (docker .errors .NotFound ) :
24+ with pytest .raises (docker .errors .APIError ) as cm :
2325 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+ )
2430
2531 def test_list_volumes (self ):
2632 name = 'imperishablenight'
You can’t perform that action at this time.
0 commit comments