summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorMilivoje Legenovic <m.legenovic@gmail.com>2021-03-02 01:16:31 +0100
committerMilivoje Legenovic <m.legenovic@gmail.com>2021-03-02 02:50:41 +0100
commit8b7caa6d04fc6a7c02bd0cbc05629508be546ac8 (patch)
treeb56af6ba1b23b68e7f4d568115b6a58cf0d756b2 /test/apiv2
parent8af66806c8042501ca32e66efdeb463cf5346cab (diff)
downloadpodman-8b7caa6d04fc6a7c02bd0cbc05629508be546ac8.tar.gz
podman-8b7caa6d04fc6a7c02bd0cbc05629508be546ac8.tar.bz2
podman-8b7caa6d04fc6a7c02bd0cbc05629508be546ac8.zip
Compat api containers/json Ports field is null
Fixes #9553 Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/20-containers.at10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 641c2adc3..4b40fde80 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -246,3 +246,13 @@ t GET containers/$cid/json 200 \
.Mounts[0].Destination="/test"
t DELETE containers/$cid?v=true 204
+
+# test port mapping
+podman run -d --rm --name bar -p 8080:9090 $IMAGE top
+
+t GET containers/json 200 \
+ .[0].Ports[0].PrivatePort=9090 \
+ .[0].Ports[0].PublicPort=8080 \
+ .[0].Ports[0].Type="tcp"
+
+podman stop bar