summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-16 08:44:27 -0500
committerGitHub <noreply@github.com>2021-02-16 08:44:27 -0500
commit0a6b76eba173dbc4b4b4ad468e15b9d9cb192292 (patch)
treebd6b594d8251291f800164ca16f6fa421b30d04e /test
parent271c5612e898f6fea68b687fdfeccf2ecc0c0b46 (diff)
parent714acf32676d4e5f16d997d70958d093c6cc8fa3 (diff)
downloadpodman-0a6b76eba173dbc4b4b4ad468e15b9d9cb192292.tar.gz
podman-0a6b76eba173dbc4b4b4ad468e15b9d9cb192292.tar.bz2
podman-0a6b76eba173dbc4b4b4ad468e15b9d9cb192292.zip
Merge pull request #9372 from matejvasek/fix_host_port
Docker [APIv2] create container: handle empty host port
Diffstat (limited to 'test')
-rw-r--r--test/python/docker/test_containers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/python/docker/test_containers.py b/test/python/docker/test_containers.py
index 5c2a5fef2..337cacd5c 100644
--- a/test/python/docker/test_containers.py
+++ b/test/python/docker/test_containers.py
@@ -86,6 +86,13 @@ class TestContainers(unittest.TestCase):
containers = self.client.containers.list(all=True)
self.assertEqual(len(containers), 2)
+ def test_start_container_with_random_port_bind(self):
+ container = self.client.containers.create(image=constant.ALPINE,
+ name="containerWithRandomBind",
+ ports={'1234/tcp': None})
+ containers = self.client.containers.list(all=True)
+ self.assertTrue(container in containers)
+
def test_stop_container(self):
top = self.client.containers.get(TestContainers.topContainerId)
self.assertEqual(top.status, "running")