Skip to content

Commit 0d40b25

Browse files
authored
test: fix flakey util test (#333)
Signed-off-by: Asra Ali <[email protected]>
1 parent eed9e6c commit 0d40b25

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

util/util_test.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,23 @@ func (UtilSuite) TestBytesMatchLenAndHashes(c *C) {
248248
err: func(test) error { return ErrWrongLength{32, 16} },
249249
},
250250
{
251-
name: "incorrect hashes",
251+
name: "incorrect hashes sha512",
252252
bytes: b,
253253
length: 16,
254254
hashes: data.Hashes{
255255
"sha512": makeHash(b, "sha256"),
256-
"sha256": makeHash(b, "sha512"),
257256
},
258257
err: func(test) error { return ErrWrongHash{"sha512", bhashes["sha256"], bhashes["sha512"]} },
259258
},
259+
{
260+
name: "incorrect hashes sha256",
261+
bytes: b,
262+
length: 16,
263+
hashes: data.Hashes{
264+
"sha256": makeHash(b, "sha512"),
265+
},
266+
err: func(test) error { return ErrWrongHash{"sha256", bhashes["sha512"], bhashes["sha256"]} },
267+
},
260268
{
261269
name: "incorrect len and hashes",
262270
bytes: b,

0 commit comments

Comments
 (0)