Fix up e2enode.GetReadySchedulableNodes, replace many uses of framework.GetReadySchedulableNodesOrDie

Remove the "OrDie" from the name (since it doesn't "or die") and add
an extra check that there is at least 1 node available, since many
callers already did that themselves, and many others should have.
This commit is contained in:
Dan Winship
2019-09-03 15:00:00 -04:00
parent 512eccac1f
commit 71b02dd422
43 changed files with 185 additions and 107 deletions

View File

@@ -58,8 +58,8 @@ var _ = SIGDescribe("NodeProblemDetector [DisabledForLargeClusters]", func() {
framework.SkipUnlessSSHKeyPresent()
ginkgo.By("Getting all nodes and their SSH-able IP addresses")
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
framework.ExpectNotEqual(len(nodes.Items), 0)
nodes, err := e2enode.GetReadySchedulableNodes(f.ClientSet)
framework.ExpectNoError(err)
hosts := []string{}
for _, node := range nodes.Items {
for _, addr := range node.Status.Addresses {