aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-03 12:05:40 -0500
committerGitHub <noreply@github.com>2021-02-03 12:05:40 -0500
commit301e54deb31aab0f84c021c2200fa1d8e3b0d323 (patch)
tree6b724bebf7343e7177abc733153c3b7ce3ce7bd6 /test
parente8db5bb6e3434f7cf22364048d55bf5f079c58b8 (diff)
parentd87f54fbba8cfdb7a04e50a1427cd17c8a0b06cd (diff)
downloadpodman-301e54deb31aab0f84c021c2200fa1d8e3b0d323.tar.gz
podman-301e54deb31aab0f84c021c2200fa1d8e3b0d323.tar.bz2
podman-301e54deb31aab0f84c021c2200fa1d8e3b0d323.zip
Merge pull request #9214 from rhatdan/wait
Fix invalid wait condition on kill
Diffstat (limited to 'test')
-rw-r--r--test/python/docker/test_containers.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/python/docker/test_containers.py b/test/python/docker/test_containers.py
index 01e049ed4..5c2a5fef2 100644
--- a/test/python/docker/test_containers.py
+++ b/test/python/docker/test_containers.py
@@ -95,6 +95,15 @@ class TestContainers(unittest.TestCase):
top.reload()
self.assertIn(top.status, ("stopped", "exited"))
+ def test_kill_container(self):
+ top = self.client.containers.get(TestContainers.topContainerId)
+ self.assertEqual(top.status, "running")
+
+ # Kill a running container and validate the state
+ top.kill()
+ top.reload()
+ self.assertIn(top.status, ("stopped", "exited"))
+
def test_restart_container(self):
# Validate the container state
top = self.client.containers.get(TestContainers.topContainerId)