e2e: fix return value of WaitForPodsWithLabelRunningReady

Because of a := assignment, the anonymous function assigned the pod
list to a local variable instead of the
WaitForPodsWithLabelRunningReady return value which therefore always
was nil.

The correct code is an assignment with = as in WaitForPodsWithLabelScheduled.
This commit is contained in:
Patrick Ohly 2019-06-04 13:35:32 +02:00
parent eaf89cfbb4
commit baef3e44cd

View File

@ -534,7 +534,7 @@ func WaitForPodsWithLabelRunningReady(c clientset.Interface, ns string, label la
var current int
err = wait.Poll(poll, timeout,
func() (bool, error) {
pods, err := WaitForPodsWithLabel(c, ns, label)
pods, err = WaitForPodsWithLabel(c, ns, label)
if err != nil {
e2elog.Logf("Failed to list pods: %v", err)
if testutils.IsRetryableAPIError(err) {