mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-25 01:49:06 +02:00
tests: Properly tear down containers in extends_w_file_subdir test
podman rmi does not guarantee that the container itself is shut down. Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
parent
6841619b9c
commit
1a24cde608
@ -51,20 +51,25 @@ class TestPodmanCompose(unittest.TestCase, RunSubprocessMixin):
|
|||||||
'{{.Image}}',
|
'{{.Image}}',
|
||||||
]
|
]
|
||||||
|
|
||||||
command_down = [
|
|
||||||
"podman",
|
|
||||||
"rmi",
|
|
||||||
"--force",
|
|
||||||
"localhost/subdir_test:me",
|
|
||||||
"docker.io/library/busybox",
|
|
||||||
]
|
|
||||||
|
|
||||||
self.run_subprocess_assert_returncode(command_up)
|
self.run_subprocess_assert_returncode(command_up)
|
||||||
# check container was created and exists
|
# check container was created and exists
|
||||||
out, _ = self.run_subprocess_assert_returncode(command_check_container)
|
out, _ = self.run_subprocess_assert_returncode(command_check_container)
|
||||||
self.assertEqual(out, b'localhost/subdir_test:me\n')
|
self.assertEqual(out, b'localhost/subdir_test:me\n')
|
||||||
# cleanup test image(tags)
|
# cleanup test image(tags)
|
||||||
self.run_subprocess_assert_returncode(command_down)
|
self.run_subprocess_assert_returncode([
|
||||||
|
str(main_path.joinpath("podman_compose.py")),
|
||||||
|
"-f",
|
||||||
|
str(main_path.joinpath("tests", "extends_w_file_subdir", "docker-compose.yml")),
|
||||||
|
"down",
|
||||||
|
])
|
||||||
|
|
||||||
|
self.run_subprocess_assert_returncode([
|
||||||
|
"podman",
|
||||||
|
"rmi",
|
||||||
|
"--force",
|
||||||
|
"localhost/subdir_test:me",
|
||||||
|
])
|
||||||
|
|
||||||
# check container did not exists anymore
|
# check container did not exists anymore
|
||||||
out, _ = self.run_subprocess_assert_returncode(command_check_container)
|
out, _ = self.run_subprocess_assert_returncode(command_check_container)
|
||||||
self.assertEqual(out, b'')
|
self.assertEqual(out, b'')
|
||||||
|
Loading…
Reference in New Issue
Block a user