test/system: Move test for default forwarder into its own case

The "Local forwarder, IPv4" pasta test, amongst other things, checks that
podman's default DNS forwarding address - 169.254.0.1 - appears in the
container's /etc/resolv.conf.  That's not really related to anything else
going on in that test (which is about _changing_ that default address).

So, move it into its own test case.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson
2024-07-19 10:00:43 +10:00
parent 62c101651f
commit 85045406b5

View File

@@ -452,12 +452,16 @@ function pasta_test_do() {
"::1 not resolved"
}
@test "Local forwarder, IPv4" {
@test "Default nameserver forwarding" {
skip_if_no_ipv4 "IPv4 not routable on the host"
# pasta is the default now so no need to set it
run_podman run --rm $IMAGE grep nameserver /etc/resolv.conf
assert "${lines[0]}" == "nameserver 169.254.1.1" "default dns forward server"
}
@test "Local forwarder, IPv4" {
skip_if_no_ipv4 "IPv4 not routable on the host"
run_podman run --rm --net=pasta:--dns-forward,198.51.100.1 \
$IMAGE nslookup 127.0.0.1 || :