diff --git a/pkg/cri/sbserver/sandbox_run_test.go b/pkg/cri/sbserver/sandbox_run_test.go index a51810925..238ef031f 100644 --- a/pkg/cri/sbserver/sandbox_run_test.go +++ b/pkg/cri/sbserver/sandbox_run_test.go @@ -145,7 +145,7 @@ func TestSelectPodIP(t *testing.T) { }, { desc: "ipv6 should be picked even if ipv4 comes first", - ips: []string{"2001:db8:85a3::8a2e:370:7334", "192.168.17.43"}, + ips: []string{"192.168.17.43", "2001:db8:85a3::8a2e:370:7334"}, expectedIP: "2001:db8:85a3::8a2e:370:7334", expectedAdditionalIPs: []string{"192.168.17.43"}, pref: "ipv6", diff --git a/pkg/cri/server/sandbox_run_test.go b/pkg/cri/server/sandbox_run_test.go index d8f494625..b1bc1ec13 100644 --- a/pkg/cri/server/sandbox_run_test.go +++ b/pkg/cri/server/sandbox_run_test.go @@ -293,7 +293,7 @@ func TestSelectPodIP(t *testing.T) { }, { desc: "ipv6 should be picked even if ipv4 comes first", - ips: []string{"2001:db8:85a3::8a2e:370:7334", "192.168.17.43"}, + ips: []string{"192.168.17.43", "2001:db8:85a3::8a2e:370:7334"}, expectedIP: "2001:db8:85a3::8a2e:370:7334", expectedAdditionalIPs: []string{"192.168.17.43"}, pref: "ipv6",