@@ -48,7 +48,7 @@ def test_run(self):
48
48
]
49
49
50
50
out , _ = self .run_subprocess_assert_returncode (run_cmd )
51
- self .assertIn (b' 127.0.0.1\t localhost' , out )
51
+ self .assertIn (b" 127.0.0.1\t localhost" , out )
52
52
53
53
# Run it again to make sure we can run it twice. I saw an issue where a second run, with
54
54
# the container left up, would fail
@@ -67,7 +67,7 @@ def test_run(self):
67
67
]
68
68
69
69
out , _ = self .run_subprocess_assert_returncode (run_cmd )
70
- self .assertIn (b' 127.0.0.1\t localhost' , out )
70
+ self .assertIn (b" 127.0.0.1\t localhost" , out )
71
71
72
72
# This leaves a container running. Not sure it's intended, but it matches docker-compose
73
73
down_cmd = [
@@ -187,3 +187,28 @@ def test_down_with_orphans(self):
187
187
],
188
188
1 ,
189
189
)
190
+
191
+ def test_down_with_network (self ):
192
+ try :
193
+ self .run_subprocess_assert_returncode ([
194
+ "coverage" ,
195
+ "run" ,
196
+ podman_compose_path (),
197
+ "-f" ,
198
+ os .path .join (test_path (), "network" , "docker-compose.yml" ),
199
+ "up" ,
200
+ "-d" ,
201
+ ])
202
+ output , _ , _ = self .run_subprocess (["podman" , "network" , "ls" ])
203
+ self .assertIn ("network_mystack" , output .decode ())
204
+ finally :
205
+ self .run_subprocess_assert_returncode ([
206
+ "coverage" ,
207
+ "run" ,
208
+ podman_compose_path (),
209
+ "-f" ,
210
+ os .path .join (test_path (), "network" , "docker-compose.yml" ),
211
+ "down" ,
212
+ ])
213
+ output , _ , _ = self .run_subprocess (["podman" , "network" , "ls" ])
214
+ self .assertNotIn ("network_mystack" , output .decode ())
0 commit comments