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

@@ -591,7 +591,8 @@ func (config *NetworkingTestConfig) setup(selector map[string]string) {
ginkgo.By("Getting node addresses")
ExpectNoError(WaitForAllNodesSchedulable(config.f.ClientSet, 10*time.Minute))
nodeList := GetReadySchedulableNodesOrDie(config.f.ClientSet)
nodeList, err := e2enode.GetReadySchedulableNodes(config.f.ClientSet)
ExpectNoError(err)
config.ExternalAddrs = e2enode.FirstAddress(nodeList, v1.NodeExternalIP)
SkipUnlessNodeCountIsAtLeast(2)