Skip to content

Commit

Permalink
test/system: fix borken pasta interface name checks
Browse files Browse the repository at this point in the history
The tests didn't check anything actually because default_ifname requires
an ip version argument to work. Thus pasta_iface was empty, add new
checks to prevent this kind of error again.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Jul 24, 2024
1 parent da3edce commit 2e20681
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/system/250-systemd.bats
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
# stop systemd container
service_cleanup

pasta_iface=$(default_ifname)
pasta_iface=$(default_ifname 4)
assert "$pasta_iface" != "" "pasta_iface is set"

# now check that the rootless netns slirp4netns process is still alive and working
run_podman unshare --rootless-netns ip addr
Expand Down
3 changes: 2 additions & 1 deletion test/system/505-networking-pasta.bats
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@ EOF
@test "Podman unshare --rootless-netns with Pasta" {
skip_if_remote "unshare is local-only"

pasta_iface=$(default_ifname)
pasta_iface=$(default_ifname 4)
assert "$pasta_iface" != "" "pasta_iface is set"

# First let's force a setup error by making pasta be "false".
ln -s /usr/bin/false $PODMAN_TMPDIR/pasta
Expand Down

0 comments on commit 2e20681

Please sign in to comment.