Skip to content

Commit

Permalink
test: fix flakey util test (#333)
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <asraa@google.com>
  • Loading branch information
asraa committed Jun 30, 2022
1 parent eed9e6c commit 0d40b25
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,23 @@ func (UtilSuite) TestBytesMatchLenAndHashes(c *C) {
err: func(test) error { return ErrWrongLength{32, 16} },
},
{
name: "incorrect hashes",
name: "incorrect hashes sha512",
bytes: b,
length: 16,
hashes: data.Hashes{
"sha512": makeHash(b, "sha256"),
"sha256": makeHash(b, "sha512"),
},
err: func(test) error { return ErrWrongHash{"sha512", bhashes["sha256"], bhashes["sha512"]} },
},
{
name: "incorrect hashes sha256",
bytes: b,
length: 16,
hashes: data.Hashes{
"sha256": makeHash(b, "sha512"),
},
err: func(test) error { return ErrWrongHash{"sha256", bhashes["sha512"], bhashes["sha256"]} },
},
{
name: "incorrect len and hashes",
bytes: b,
Expand Down

0 comments on commit 0d40b25

Please sign in to comment.