summaryrefslogtreecommitdiff
path: root/test/apiv2/20-containers.at
diff options
context:
space:
mode:
Diffstat (limited to 'test/apiv2/20-containers.at')
-rw-r--r--test/apiv2/20-containers.at21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index a99e9a184..18364a47d 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -31,6 +31,13 @@ t GET libpod/containers/json?all=true 200 \
.[0].ExitCode=0 \
.[0].IsInfra=false
+# Test compat API for Network Settings
+t GET /containers/json?all=true 200 \
+ length=1 \
+ .[0].Id~[0-9a-f]\\{64\\} \
+ .[0].Image=$IMAGE \
+ .[0].NetworkSettings.Networks.podman.NetworkID=podman
+
# Make sure `limit` works.
t GET libpod/containers/json?limit=1 200 \
length=1 \
@@ -206,9 +213,9 @@ t GET 'containers/json?limit=0&all=1' 200 \
t GET containers/json?limit=2 200 length=2
# Filter with two ids should return both container
-t GET "containers/json?filters=%7B%22id%22%3A%5B%22${cid}%22%2C%22${cid_top}%22%5D%7D&all=1" 200 length=2
+t GET containers/json?filters='{"id":["'${cid}'","'${cid_top}'"]}&all=1' 200 length=2
# Filter with two ids and status running should return only 1 container
-t GET "containers/json?filters=%7B%22id%22%3A%5B%22${cid}%22%2C%22${cid_top}%22%5D%2C%22status%22%3A%5B%22running%22%5D%7D&all=1" 200 \
+t GET containers/json?filters='{"id":["'${cid}'","'${cid_top}'"],"status":["running"]}&all=1' 200 \
length=1 \
.[0].Id=${cid_top}
@@ -246,3 +253,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