aboutsummaryrefslogtreecommitdiff
path: root/test/python/docker/test_containers.py
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-08 17:48:06 -0500
committerGitHub <noreply@github.com>2021-02-08 17:48:06 -0500
commita5ab59ede7578fb9867f5d5e29db6e82319f4688 (patch)
treec6c3b24edd135381bc6670e9214c7e8cb8b9b073 /test/python/docker/test_containers.py
parentbcf7d4383d532477ea97511e6565ed00480ad8b8 (diff)
parentf645880ecdb90c44727b5f2aea50ae74257f7c5d (diff)
downloadpodman-a5ab59ede7578fb9867f5d5e29db6e82319f4688.tar.gz
podman-a5ab59ede7578fb9867f5d5e29db6e82319f4688.tar.bz2
podman-a5ab59ede7578fb9867f5d5e29db6e82319f4688.zip
Merge pull request #9273 from mheon/backport_api_changes
[v3.0] Backport final breaking API change to v3.0
Diffstat (limited to 'test/python/docker/test_containers.py')
-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)