From c517811fc8ac090ad0333e6f1ec56cbfac228ed3 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Fri, 9 Sep 2016 09:38:47 +0200 Subject: [PATCH] Fix checking for allowed not-ready nodes in test framework --- test/e2e/framework/util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 2a7d4c1be2d..c034a7f3ad6 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -4213,7 +4213,7 @@ func allowedNotReadyReasons(nodes []*api.Node) bool { // and figure out how to do it in a configurable way, as we can't expect all setups to run // default test add-ons. func AllNodesReady(c *client.Client, timeout time.Duration) error { - Logf("Waiting up to %v for all (but %d) nodes to be ready", TestContext.AllowedNotReadyNodes, timeout) + Logf("Waiting up to %v for all (but %d) nodes to be ready", timeout, TestContext.AllowedNotReadyNodes) var notReady []*api.Node err := wait.PollImmediate(Poll, timeout, func() (bool, error) { @@ -4246,8 +4246,8 @@ func AllNodesReady(c *client.Client, timeout time.Duration) error { return err } - if len(notReady) > 0 { - return fmt.Errorf("Not ready nodes: %v", notReady) + if len(notReady) > TestContext.AllowedNotReadyNodes || !allowedNotReadyReasons(notReady) { + return fmt.Errorf("Not ready nodes: %#v", notReady) } return nil }