From c2cb4821819fa6cedaa789513192d41b071b08ed Mon Sep 17 00:00:00 2001 From: wongearl Date: Sat, 9 Jul 2022 17:15:27 +0800 Subject: [PATCH] omit comparison to bool constant --- test/e2e/common/node/container_probe.go | 4 ++-- test/e2e/common/node/pod_admission.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/e2e/common/node/container_probe.go b/test/e2e/common/node/container_probe.go index 5c7f8b7d8b1..b75bd4f6364 100644 --- a/test/e2e/common/node/container_probe.go +++ b/test/e2e/common/node/container_probe.go @@ -615,7 +615,7 @@ done return false, err } // verify the pod ready status has reported not ready - return podutil.IsPodReady(pod) == false, nil + return !podutil.IsPodReady(pod), nil }) framework.ExpectNoError(err) }) @@ -698,7 +698,7 @@ done return false, err } // verify the pod ready status has reported not ready - return podutil.IsPodReady(pod) == false, nil + return !podutil.IsPodReady(pod), nil }) framework.ExpectNoError(err) diff --git a/test/e2e/common/node/pod_admission.go b/test/e2e/common/node/pod_admission.go index 213b94107ce..7f7800933ee 100644 --- a/test/e2e/common/node/pod_admission.go +++ b/test/e2e/common/node/pod_admission.go @@ -18,6 +18,7 @@ package node import ( "context" + "github.com/onsi/ginkgo/v2" v1 "k8s.io/api/core/v1" @@ -83,7 +84,7 @@ func findLinuxNode(f *framework.Framework) (v1.Node, error) { } } - if foundNode == false { + if !foundNode { e2eskipper.Skipf("Could not find and ready and schedulable Linux nodes") }