test/system: fix borken pasta interface name checks

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 <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2024-07-24 14:56:30 +02:00
parent da3edce4e6
commit 2e20681f05
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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