From 104b5a0f2c12ec850027316100250506782a6b48 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 13 May 2024 12:47:02 +0200 Subject: [PATCH] Fix assertion for host network hostname e2e test The original assumption is wrong, as the node name may not match the hostname of the host in some circumstances. Signed-off-by: Sascha Grunert --- test/e2e/network/dns.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/network/dns.go b/test/e2e/network/dns.go index 0e38b7aa0df..43263298525 100644 --- a/test/e2e/network/dns.go +++ b/test/e2e/network/dns.go @@ -686,8 +686,8 @@ var _ = common.SIGDescribe("DNS HostNetwork", func() { stdout, err := e2eoutput.RunHostCmd(testAgnhostPod.Namespace, testAgnhostPod.Name, "hostname") framework.ExpectNoError(err, "failed to run command hostname: %s", stdout) hostname := strings.TrimSpace(stdout) - if node.Name != hostname { - framework.Failf("expected hostname: %s, got: %s", node.Name, hostname) + if dnsTestPodHostName == hostname { + framework.Failf("https://issues.k8s.io/67019 expected spec.Hostname %s to be ignored", hostname) } })