From 9a67558784354c09487a980f1dac8ca76cd1ce90 Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Tue, 2 Feb 2021 16:04:02 -0800 Subject: [PATCH] Fix a bug that untolerated variable is used as tolerated --- test/integration/framework/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/framework/util.go b/test/integration/framework/util.go index 76c21bda30a..7b2087e652c 100644 --- a/test/integration/framework/util.go +++ b/test/integration/framework/util.go @@ -266,8 +266,8 @@ func isNodeUntainted(node *v1.Node) bool { n = nodeCopy } - _, tolerated := v1helper.FindMatchingUntoleratedTaint(n.Spec.Taints, fakePod.Spec.Tolerations, func(t *v1.Taint) bool { + _, untolerated := v1helper.FindMatchingUntoleratedTaint(n.Spec.Taints, fakePod.Spec.Tolerations, func(t *v1.Taint) bool { return t.Effect == v1.TaintEffectNoExecute || t.Effect == v1.TaintEffectNoSchedule }) - return tolerated + return !untolerated }