Skip to content

Commit

Permalink
Fix e2e network dns_configmap test
Browse files Browse the repository at this point in the history
Updates predicate to check for a length >=2 to avoid
the index out of bounds panic.

Signed-off-by: Edwin Xie <exie@vmware.com>
Co-authored-by: Tyler Schultz <tschultz@vmware.com>
  • Loading branch information
flawedmatrix and tylerschultz committed Aug 4, 2022
1 parent eefcf6a commit f167b9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/network/dns_configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f167b9f

Please sign in to comment.