From 80a95684d8632872da4972fccc6a32fb852c02d7 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Mon, 17 Jul 2023 01:12:00 +0200 Subject: [PATCH] Adjust expected test result (for self-signed root path) --- .../org/pgpainless/wot/query/AuthenticateTests.kt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sequoia-wot-vectors/src/test/kotlin/org/pgpainless/wot/query/AuthenticateTests.kt b/sequoia-wot-vectors/src/test/kotlin/org/pgpainless/wot/query/AuthenticateTests.kt index 8b3fd22f..53e25a74 100644 --- a/sequoia-wot-vectors/src/test/kotlin/org/pgpainless/wot/query/AuthenticateTests.kt +++ b/sequoia-wot-vectors/src/test/kotlin/org/pgpainless/wot/query/AuthenticateTests.kt @@ -698,10 +698,18 @@ class AuthenticateTest { sp(q2, t.aliceFpr, t.aliceUid, listOf(Pair(90, listOf(t.aliceFpr))), null) + // NOTE: original expectation from sequoia-wot: + // sp(q2, t.bobFpr, t.bobUid, + // listOf(Pair(90, listOf(t.bobFpr)), + // Pair(90, listOf(t.aliceFpr, t.bobFpr))), null) + + // Our changed expectation: the order has changed because we return self-signed roots including the + // self-certification edge. + // This also happens to result in different ordering of the two paths, in this case. sp(q2, t.bobFpr, t.bobUid, - listOf(Pair(90, listOf(t.bobFpr)), - Pair(90, listOf(t.aliceFpr, t.bobFpr))), - null) + listOf(Pair(90, listOf(t.aliceFpr, t.bobFpr)), + Pair(90, listOf(t.bobFpr)) + ), null) } @Test