Merge pull request #124846 from saschagrunert/local-hostname

Fix assertion for host network hostname e2e test
This commit is contained in:
Kubernetes Prow Robot 2024-05-13 07:47:16 -07:00 committed by GitHub
commit 8e5b26b4c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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