gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (375b3af7 -> fbf1b3e9)


From: gnunet
Subject: [taler-wallet-core] branch master updated (375b3af7 -> fbf1b3e9)
Date: Tue, 27 Jul 2021 10:08:08 +0200

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

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

    from 375b3af7 Configure Sandbox before tests
     new d5919338 (sandbox) key-rotation command
     new fbf1b3e9 Sandbox keyrotation testcase.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/integrationtests/libeufin.ts               | 13 +++++++--
 ...-api-facade.ts => test-libeufin-keyrotation.ts} | 31 ++++++++++++----------
 .../src/integrationtests/testrunner.ts             |  2 ++
 3 files changed, 30 insertions(+), 16 deletions(-)
 copy 
packages/taler-wallet-cli/src/integrationtests/{test-libeufin-api-facade.ts => 
test-libeufin-keyrotation.ts} (67%)

diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts 
b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
index 867de706..7a6f3ee1 100644
--- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
@@ -699,6 +699,14 @@ export class LibeufinCli {
 }
 
 export namespace LibeufinSandboxApi {
+  export async function rotateKeys(
+    libeufinSandboxService: LibeufinSandboxServiceInterface,
+    hostID: string,
+  ) {
+    const baseUrl = libeufinSandboxService.baseUrl;
+    let url = new URL(`admin/ebics/hosts/${hostID}/rotate-keys`, baseUrl);
+    await axios.post(url.href);
+  }
   export async function createEbicsHost(
     libeufinSandboxService: LibeufinSandboxServiceInterface,
     hostID: string,
@@ -1062,13 +1070,13 @@ export namespace LibeufinNexusApi {
     accountName: string,
     username: string = "admin",
     password: string = "test",
-  ): Promise<void> {
+  ): Promise<any> {
     const baseUrl = libeufinNexusService.baseUrl;
     let url = new URL(
       `/bank-accounts/${accountName}/fetch-transactions`,
       baseUrl,
     );
-    await axios.post(
+    return await axios.post(
       url.href,
       {
         rangeType: "all",
@@ -1079,6 +1087,7 @@ export namespace LibeufinNexusApi {
           username: username,
           password: password,
         },
+        validateStatus: () => true,
       },
     );
   }
diff --git 
a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts 
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
similarity index 67%
copy from 
packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts
copy to 
packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
index edbbbca0..97135267 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts
+++ 
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
@@ -29,7 +29,7 @@ import {
 /**
  * Run basic test with LibEuFin.
  */
-export async function runLibeufinApiFacadeTest(t: GlobalTestState) {
+export async function runLibeufinKeyrotationTest(t: GlobalTestState) {
   /**
    * User saltetd "01"
    */
@@ -43,22 +43,25 @@ export async function runLibeufinApiFacadeTest(t: 
GlobalTestState) {
    * Launch Sandbox and Nexus.
    */
   const libeufinServices = await launchLibeufinServices(
-    t,
-    [user01nexus],
-    [user01sandbox],
+    t, [user01nexus], [user01sandbox],
   );
-  let resp = await LibeufinNexusApi.getAllFacades(
+
+  await LibeufinNexusApi.fetchAllTransactions(
     libeufinServices.libeufinNexus,
+    user01nexus.localAccountName,
+  );
+
+  /* Rotate the Sandbox keys, and fetch the transactions again */
+  await LibeufinSandboxApi.rotateKeys(
+    libeufinServices.libeufinSandbox,
+    user01sandbox.ebicsBankAccount.subscriber.hostID,
   );
-  // check that original facade shows up.
-  t.assertTrue(resp.data["facades"][0]["name"] == user01nexus.twgReq["name"]);
-  // delete it.
-  resp = await LibeufinNexusApi.deleteFacade(
+
+  const resp = await LibeufinNexusApi.fetchAllTransactions(
     libeufinServices.libeufinNexus,
-    user01nexus.twgReq["name"],
+    user01nexus.localAccountName,
   );
-  // check that no facades show up.
-  t.assertTrue(!resp.data.hasOwnProperty("facades"));
+  console.log("Attempted fetch after key rotation", resp.data);
+  t.assertTrue(resp.status == 500);
 }
-
-runLibeufinApiFacadeTest.suites = ["libeufin"];
+runLibeufinKeyrotationTest.suites = ["libeufin"];
diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts 
b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
index 8162eccd..b9225757 100644
--- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
@@ -56,6 +56,7 @@ import { runWithdrawalBankIntegratedTest } from 
"./test-withdrawal-bank-integrat
 import M from "minimatch";
 import { runMerchantExchangeConfusionTest } from 
"./test-merchant-exchange-confusion";
 import { runLibeufinBasicTest } from "./test-libeufin-basic";
+import { runLibeufinKeyrotationTest } from "./test-libeufin-keyrotation";
 import { runLibeufinRefundTest } from "./test-libeufin-refund";
 import { runLibeufinRefundMultipleUsersTest } from 
"./test-libeufin-refund-multiple-users";
 import { runLibeufinTutorialTest } from "./test-libeufin-tutorial";
@@ -95,6 +96,7 @@ const allTests: TestMainFunction[] = [
   runExchangeManagementTest,
   runFeeRegressionTest,
   runLibeufinBasicTest,
+  runLibeufinKeyrotationTest,
   runLibeufinTutorialTest,
   runLibeufinRefundTest,
   runLibeufinRefundMultipleUsersTest,

-- 
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]