update podman socket output to include also exposed ports

Fixes https://github.com/containers/podman/issues/25851

Co-authored-by: Brent Baude <bbaude@redhat.com>
Signed-off-by: Cesar Goncalves <mail@cesargoncalves.com>
This commit is contained in:
Cesar Goncalves
2025-04-11 23:15:05 +01:00
parent 48423a615d
commit a969dbd73e
2 changed files with 44 additions and 13 deletions

View File

@ -427,7 +427,17 @@ t GET containers/json 200 \
.[0].Ports[0].PublicPort=8080 \
.[0].Ports[0].Type="tcp"
podman stop bar
podman rm -f bar
# confirm exposed port 8080 shows up in /containers/json
podman run -d --rm --name bar --expose 8080 $IMAGE top
t GET containers/json 200 \
.[0].Ports[0].PrivatePort=8080 \
.[0].Ports[0].Type="tcp"
podman rm -f bar
#compat api list containers sanity checks
podman run -d --rm --name labelcontainer_with --label slartibart=fast $IMAGE top