Update some tests to fall back to InternalIP if ExternalIP isn't set

This commit is contained in:
Dan Winship 2017-07-17 16:37:16 -04:00
parent a9afb931d4
commit 9377a4bf32

View File

@ -307,6 +307,10 @@ func GetNodePublicIps(c clientset.Interface) ([]string, error) {
nodes := GetReadySchedulableNodesOrDie(c)
ips := CollectAddresses(nodes, v1.NodeExternalIP)
if len(ips) == 0 {
// If ExternalIP isn't set, assume the test programs can reach the InternalIP
ips = CollectAddresses(nodes, v1.NodeInternalIP)
}
return ips, nil
}