cleanup: omit comparison with bool constants

Signed-off-by: tao.yang <tao.yang@daocloud.io>
This commit is contained in:
tao.yang
2023-09-04 16:59:23 +08:00
parent d4050a80c7
commit b35357b6c0
33 changed files with 57 additions and 57 deletions

View File

@@ -163,9 +163,9 @@ func TestEvictionForNoExecuteTaintAddedByUser(t *testing.T) {
t.Fatalf("Test Failed: error: %q, while getting updated pod", err)
}
_, cond := podutil.GetPodCondition(&testPod.Status, v1.DisruptionTarget)
if test.enablePodDisruptionConditions == true && cond == nil {
if test.enablePodDisruptionConditions && cond == nil {
t.Errorf("Pod %q does not have the expected condition: %q", klog.KObj(testPod), v1.DisruptionTarget)
} else if test.enablePodDisruptionConditions == false && cond != nil {
} else if !test.enablePodDisruptionConditions && cond != nil {
t.Errorf("Pod %q has an unexpected condition: %q", klog.KObj(testPod), v1.DisruptionTarget)
}
})