summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-05-04 11:25:12 +0200
committerPaul Holzinger <paul.holzinger@web.de>2021-05-04 11:25:12 +0200
commitf185666da8cc3af053f4d794d249f2fedc6e67e4 (patch)
tree1e049912bf5dfa7762a24128f209a4073446c2e9 /test
parent9788289f942ff7a79c214446047d0f943c66f409 (diff)
downloadpodman-f185666da8cc3af053f4d794d249f2fedc6e67e4.tar.gz
podman-f185666da8cc3af053f4d794d249f2fedc6e67e4.tar.bz2
podman-f185666da8cc3af053f4d794d249f2fedc6e67e4.zip
compat api: Networks must be empty instead of null
The compat endpoint for container inspect must return {} instead of null for NetworkSettings.Networks. Fixes #9837 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/20-containers.at5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 58b2dff0a..66ba099e3 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -205,10 +205,15 @@ t GET containers/$cid/json 200 \
t POST containers/create Image=$IMAGE Entrypoint='["top"]' 201 \
.Id~[0-9a-f]\\{64\\}
cid_top=$(jq -r '.Id' <<<"$output")
+network_expect="{}"
+if root; then
+ network_expect='.podman.NetworkID=podman'
+fi
t GET containers/${cid_top}/json 200 \
.Config.Entrypoint[0]="top" \
.Config.Cmd='[]' \
.Path="top"
+ .NetworkSettings.Networks="$network_expect"
t POST containers/${cid_top}/start 204
# make sure the container is running
t GET containers/${cid_top}/json 200 \