From baef3e44cdcedefde6b51f8f261f24d8eaa81fd8 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 4 Jun 2019 13:35:32 +0200 Subject: [PATCH] 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. --- test/e2e/framework/pod/wait.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/pod/wait.go b/test/e2e/framework/pod/wait.go index abb08060bda..392ddf81004 100644 --- a/test/e2e/framework/pod/wait.go +++ b/test/e2e/framework/pod/wait.go @@ -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) {