gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 03/03: Fix key-rotation test case.


From: gnunet
Subject: [taler-wallet-core] 03/03: Fix key-rotation test case.
Date: Fri, 15 Oct 2021 07:50:31 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository wallet-core.

commit f2492cac6d0e97aa0c90b0659cae47af834af699
Author: ms <ms@taler.net>
AuthorDate: Thu Oct 14 23:23:35 2021 +0200

    Fix key-rotation test case.
---
 .../integrationtests/test-libeufin-keyrotation.ts  | 24 ++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git 
a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts 
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
index 6a5e5c20..8e527804 100644
--- 
a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
+++ 
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
@@ -57,11 +57,23 @@ export async function runLibeufinKeyrotationTest(t: 
GlobalTestState) {
     user01sandbox.ebicsBankAccount.subscriber.hostID,
   );
 
-  const resp = await LibeufinNexusApi.fetchTransactions(
-    libeufinServices.libeufinNexus,
-    user01nexus.localAccountName,
-  );
-  console.log("Attempted fetch after key rotation", resp.data);
-  t.assertTrue(resp.status == 500);
+  try {
+    await LibeufinNexusApi.fetchTransactions(
+      libeufinServices.libeufinNexus,
+      user01nexus.localAccountName,
+    );
+  } catch (e: any) {
+    /**
+     * Asserting that Nexus responded with a 500 Internal server
+     * error, because the bank signed the last response with a new
+     * key pair that was never downloaded by Nexus.
+     *
+     * NOTE: the bank accepted the request addressed to the old
+     * public key.  Should it in this case reject the request even
+     * before trying to verify it?
+     */
+    t.assertTrue(e.response.status == 500);
+    t.assertTrue(e.response.data.code == 9000);
+  }
 }
 runLibeufinKeyrotationTest.suites = ["libeufin"];

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]