File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def tearDown(self):
36
36
pass
37
37
for container in self .tmp_containers :
38
38
try :
39
- client .api .remove_container (container , force = True )
39
+ client .api .remove_container (container , force = True , v = True )
40
40
except docker .errors .APIError :
41
41
pass
42
42
for network in self .tmp_networks :
Original file line number Diff line number Diff line change @@ -47,10 +47,13 @@ def test_run_with_volume(self):
47
47
self .tmp_containers .append (container .id )
48
48
container .wait ()
49
49
50
+ name = "container_volume_test"
50
51
out = client .containers .run (
51
52
"alpine" , "cat /insidecontainer/test" ,
52
- volumes = ["%s:/insidecontainer" % path ]
53
+ volumes = ["%s:/insidecontainer" % path ],
54
+ name = name
53
55
)
56
+ self .tmp_containers .append (name )
54
57
assert out == b'hello\n '
55
58
56
59
def test_run_with_named_volume (self ):
@@ -66,10 +69,13 @@ def test_run_with_named_volume(self):
66
69
self .tmp_containers .append (container .id )
67
70
container .wait ()
68
71
72
+ name = "container_volume_test"
69
73
out = client .containers .run (
70
74
"alpine" , "cat /insidecontainer/test" ,
71
- volumes = ["somevolume:/insidecontainer" ]
75
+ volumes = ["somevolume:/insidecontainer" ],
76
+ name = name
72
77
)
78
+ self .tmp_containers .append (name )
73
79
assert out == b'hello\n '
74
80
75
81
def test_run_with_network (self ):
You can’t perform that action at this time.
0 commit comments