mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-12 21:40:29 +00:00
Let CloudProvider return list of NodeAddress, not just one net.IP
This lets cloud providers populate the NodeAddress array
This commit is contained in:
@@ -81,12 +81,14 @@ func TestVagrantCloud(t *testing.T) {
|
||||
t.Fatalf("Invalid instance returned")
|
||||
}
|
||||
|
||||
ip, err := vagrantCloud.IPAddress(instances[0])
|
||||
addrs, err := vagrantCloud.NodeAddresses(instances[0])
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error, should have returned a valid IP address: %s", err)
|
||||
t.Fatalf("Unexpected error, should have returned valid NodeAddresses: %s", err)
|
||||
}
|
||||
|
||||
if ip.String() != expectedInstanceIP {
|
||||
if len(addrs) != 1 {
|
||||
t.Fatalf("should have returned exactly one NodeAddress: %v", addrs)
|
||||
}
|
||||
if addrs[0].Address != expectedInstanceIP {
|
||||
t.Fatalf("Invalid IP address returned")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user