cleanup: omit comparison with bool constants

Signed-off-by: tao.yang <tao.yang@daocloud.io>

Kubernetes-commit: b35357b6c08f21ba0fd312536051394c2567ec79
This commit is contained in:
tao.yang 2023-09-04 16:59:23 +08:00 committed by Kubernetes Publisher
parent b0036672f5
commit 0447e1f9ce

View File

@ -264,7 +264,7 @@ func TestHeap_Get(t *testing.T) {
}
// Get non-existing object.
_, exists, err = h.Get(mkHeapObj("non-existing", 0))
if err != nil || exists == true {
if err != nil || exists {
t.Fatalf("didn't expect to get any object")
}
}
@ -283,7 +283,7 @@ func TestHeap_GetByKey(t *testing.T) {
}
// Get non-existing object.
_, exists, err = h.GetByKey("non-existing")
if err != nil || exists == true {
if err != nil || exists {
t.Fatalf("didn't expect to get any object")
}
}