From b5783ae1fb2c3ca432cb196f29d31f27fa7da631 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 25 Jun 2025 16:58:10 +0200 Subject: [PATCH] test/e2e: fix podman run check dns flake For unknown reasons systemd-resolved sometimes responds with NXDOMAIN instead REFUSED which it seems to use by default for a local name without domain part. So the fact that this works at all right now is super weird. In any case we just want to make sure the name did not get resolved so allow both here to fix the flake. Signed-off-by: Paul Holzinger --- test/e2e/run_networking_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 13e1fb81db..0a56689325 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -1166,7 +1166,10 @@ EXPOSE 2004-2005/tcp`, ALPINE) session = podmanTest.Podman([]string{"run", "--name", "con3", "--pod", pod2, CITEST_IMAGE, "nslookup", "con1."}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitWithError(1, "")) - Expect(session.OutputToString()).To(ContainSubstring("NXDOMAIN")) + // This flakes on debian with systemd-resolved, also resolved behavior between A and AAAA lookups differ: + // https://github.com/systemd/systemd/issues/37969 + // In short we can get NXDOMAIN or REFUSED as reply. Both seems fine for the purpose of a negative lookup. + Expect(session.OutputToString()).To(Or(ContainSubstring("NXDOMAIN"), ContainSubstring("REFUSED"))) session = podmanTest.Podman([]string{"run", "--name", "con4", "--network", net, CITEST_IMAGE, "nslookup", pod2 + ".dns.podman"}) session.WaitWithDefaultTimeout()