From f185666da8cc3af053f4d794d249f2fedc6e67e4 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 4 May 2021 11:25:12 +0200 Subject: 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 --- test/apiv2/20-containers.at | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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 \ -- cgit v1.2.3-54-g00ecf