mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-03 20:40:26 -05:00
Merge pull request #136622 from guettli/e2e-better-msg-when-no-address-found
e2e: Better error message, when no InternalIP was found.
This commit is contained in:
commit
702e2a3800
1 changed files with 4 additions and 1 deletions
|
|
@ -1267,6 +1267,9 @@ func getNodeHostIP(ctx context.Context, f *framework.Framework, nodeName string)
|
|||
node, err := f.ClientSet.CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{})
|
||||
framework.ExpectNoError(err)
|
||||
ips := e2enode.GetAddressesByTypeAndFamily(node, v1.NodeInternalIP, family)
|
||||
gomega.Expect(ips).ToNot(gomega.BeEmpty())
|
||||
if len(ips) == 0 {
|
||||
framework.Failf("No address by type (%s) and family (%s) on node (%s) found.",
|
||||
v1.NodeInternalIP, family, nodeName)
|
||||
}
|
||||
return ips[0]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue