treewide: replace call to bytes.Compare with bytes.Equal

Change-Id: I6498593b67386ae858fb06a48f2385940688d880
Reviewed-on: https://review.monogon.dev/c/monogon/+/3009
Vouch-Run-CI: Tim Windelschmidt <tim@monogon.tech>
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/node/core/consensus/consensus_test.go b/metropolis/node/core/consensus/consensus_test.go
index f2bafba..1866ff5 100644
--- a/metropolis/node/core/consensus/consensus_test.go
+++ b/metropolis/node/core/consensus/consensus_test.go
@@ -249,7 +249,7 @@
 	}
 	ctxC()
 
-	if bytes.Compare(firstCA, secondCA) != 0 {
+	if !bytes.Equal(firstCA, secondCA) {
 		t.Fatalf("wanted same, got different CAs accross runs")
 	}
 }
diff --git a/metropolis/node/core/curator/impl_leader_test.go b/metropolis/node/core/curator/impl_leader_test.go
index f5072b6..0b39410 100644
--- a/metropolis/node/core/curator/impl_leader_test.go
+++ b/metropolis/node/core/curator/impl_leader_test.go
@@ -807,7 +807,7 @@
 	}
 
 	// Compare the received CUK with the one we started out with.
-	if bytes.Compare(cuk, jr.ClusterUnlockKey) != 0 {
+	if !bytes.Equal(cuk, jr.ClusterUnlockKey) {
 		t.Fatal("JoinNode returned an invalid CUK.")
 	}
 }
diff --git a/metropolis/pkg/verity/encoder_test.go b/metropolis/pkg/verity/encoder_test.go
index b53e06e..db86cd6 100644
--- a/metropolis/pkg/verity/encoder_test.go
+++ b/metropolis/pkg/verity/encoder_test.go
@@ -175,7 +175,7 @@
 	}
 
 	// Return true, if read data matches expectedData.
-	if bytes.Compare(expectedData, readData) == 0 {
+	if bytes.Equal(expectedData, readData) {
 		return true
 	}
 	return false