Fix flaky metadata decoding test
This commit is contained in:
parent
fcbd62ba3b
commit
cb9d3c701b
1 changed files with 4 additions and 1 deletions
|
@ -26,7 +26,10 @@ internal class MetadataWriterDecoderTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `encoded metadata matches decoded metadata (no packages)`() {
|
fun `encoded metadata matches decoded metadata (no packages)`() {
|
||||||
val metadata = getMetadata()
|
val metadata = getMetadata().let {
|
||||||
|
if (it.version == 0.toByte()) it.copy(salt = "") // no salt in version 0
|
||||||
|
else it
|
||||||
|
}
|
||||||
assertEquals(
|
assertEquals(
|
||||||
metadata,
|
metadata,
|
||||||
decoder.decode(encoder.encode(metadata), metadata.version, metadata.token)
|
decoder.decode(encoder.encode(metadata), metadata.version, metadata.token)
|
||||||
|
|
Loading…
Reference in a new issue