1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-25 12:27:58 +01:00

Adjust test: adjust expected values in Auth test

This commit is contained in:
Heiko Schaefer 2023-07-17 01:14:28 +02:00
parent a811c96576
commit 75a514756b
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -55,7 +55,15 @@ class AuthenticateTest {
}.zip(expected).withIndex() }.zip(expected).withIndex()
.forEach { (i, b) -> .forEach { (i, b) ->
val g = b.first val g = b.first
val e = b.second var e = b.second
// Adjust test expectations: sequoia-wot returns 1-step paths for self-signed roots.
// We return a 2-step path.
if (e.second.size == 1) {
val list = e.second.toMutableList()
list.add(list[0])
e = Pair(e.first, list.toList())
}
assertEquals(e, g, "got vs. expected path (#$i)") assertEquals(e, g, "got vs. expected path (#$i)")
assertEquals(e.first, g.first, "got vs. expected trust amount (#$i)") assertEquals(e.first, g.first, "got vs. expected trust amount (#$i)")