Skip to content

Commit

Permalink
tests/quadlet: Fix network name retrieval in podman inspect
Browse files Browse the repository at this point in the history
A recent Podman release updated `podman inspect` to properly return
the NetworkID instead of the name [1]. Update the retrieval of the
network name to use the first key in the dictionary, since there is
only one network.

[1]: containers/podman#24910
  • Loading branch information
marmijo committed Jan 30, 2025
1 parent ec1a776 commit f6369de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/kola/containers/quadlet/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ container_info=$(podman container inspect systemd-test)
if [[ "$(jq -r '.[0].ImageName' <<< "$container_info")" != "quay.io/fedora/fedora-minimal:latest" ]]; then
fatal "Container not using the correct image"
fi
if [[ "$(jq -r '.[0].NetworkSettings.Networks[].NetworkID' <<< "$container_info")" != "systemd-test" ]]; then
if [[ "$(jq -r '.[0].NetworkSettings.Networks | keys[0]' <<< "$container_info")" != "systemd-test" ]]; then
fatal "Container not using the correct network"
fi
if [[ "$(jq -r '.[0].HostConfig.Binds[0]' <<< "$container_info")" != "systemd-test:/data:rw,rprivate,nosuid,nodev,rbind" ]]; then
Expand Down

0 comments on commit f6369de

Please sign in to comment.