From f167b9f4ab31ba598c430047d3ff8ba5dd68b7f4 Mon Sep 17 00:00:00 2001 From: Edwin Xie Date: Thu, 4 Aug 2022 20:52:26 +0000 Subject: [PATCH] Fix e2e network dns_configmap test Updates predicate to check for a length >=2 to avoid the index out of bounds panic. Signed-off-by: Edwin Xie Co-authored-by: Tyler Schultz --- test/e2e/network/dns_configmap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/network/dns_configmap.go b/test/e2e/network/dns_configmap.go index a1293d7034c..d1a45c3f3aa 100644 --- a/test/e2e/network/dns_configmap.go +++ b/test/e2e/network/dns_configmap.go @@ -298,7 +298,7 @@ func (t *dnsExternalNameTest) run(isIPv6 bool) { t.checkDNSRecordFrom( fmt.Sprintf("%s.%s.svc.%s", serviceNameLocal, f.Namespace.Name, framework.TestContext.ClusterDNSDomain), func(actual []string) bool { - return len(actual) >= 1 && actual[0] == fooHostname+"." && actual[1] == "2001:db8::29" + return len(actual) >= 2 && actual[0] == fooHostname+"." && actual[1] == "2001:db8::29" }, "cluster-dns-ipv6", moreForeverTestTimeout)