gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (44470295b -> 6ab8e563f)


From: gnunet
Subject: [taler-wallet-core] branch master updated (44470295b -> 6ab8e563f)
Date: Mon, 13 Nov 2023 13:02:33 +0100

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

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

    from 44470295b harness: logging
     new 69cac220a -formatting
     new 6ab8e563f harness: fix libeufin-bank test

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:
 packages/taler-harness/src/harness/harness.ts      | 12 +++++++++-
 .../src/integrationtests/test-libeufin-bank.ts     | 28 ++++++++++++----------
 .../integrationtests/test-withdrawal-abort-bank.ts |  2 +-
 packages/taler-util/src/bank-api-client.ts         |  3 +--
 4 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/packages/taler-harness/src/harness/harness.ts 
b/packages/taler-harness/src/harness/harness.ts
index 8c2ce1873..5f90c8daf 100644
--- a/packages/taler-harness/src/harness/harness.ts
+++ b/packages/taler-harness/src/harness/harness.ts
@@ -793,7 +793,11 @@ export class LibeufinBankService
       throw Error("Can't set suggested exchange while bank is running.");
     }
     const config = Configuration.load(this.configFile);
-    config.setString("libeufin-bank", "suggested_withdrawal_exchange", 
e.baseUrl);
+    config.setString(
+      "libeufin-bank",
+      "suggested_withdrawal_exchange",
+      e.baseUrl,
+    );
     config.write(this.configFile, { excludeDefaults: true });
   }
 
@@ -822,6 +826,12 @@ export class LibeufinBankService
       `libeufin-bank dbinit -r -c "${this.configFile}"`,
     );
 
+    await sh(
+      this.globalTestState,
+      "libeufin-bank-dbinit",
+      `libeufin-bank passwd -c "${this.configFile}" admin adminpw`,
+    );
+
     this.proc = this.globalTestState.spawnService(
       "libeufin-bank",
       ["serve", "-c", this.configFile],
diff --git a/packages/taler-harness/src/integrationtests/test-libeufin-bank.ts 
b/packages/taler-harness/src/integrationtests/test-libeufin-bank.ts
index c8c668bed..8f5cc8a35 100644
--- a/packages/taler-harness/src/integrationtests/test-libeufin-bank.ts
+++ b/packages/taler-harness/src/integrationtests/test-libeufin-bank.ts
@@ -18,17 +18,17 @@
  * Imports.
  */
 import {
-  TalerCorebankApiClient,
   CreditDebitIndicator,
+  Logger,
+  TalerCorebankApiClient,
+  TransactionMajorState,
+  TransactionMinorState,
   WireGatewayApiClient,
   createEddsaKeyPair,
   encodeCrock,
-  Logger,
   j2s,
-  NotificationType,
-  TransactionMajorState,
-  TransactionMinorState,
 } from "@gnu-taler/taler-util";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
 import { defaultCoinConfig } from "../harness/denomStructures.js";
 import {
   ExchangeService,
@@ -40,7 +40,6 @@ import {
   setupDb,
 } from "../harness/harness.js";
 import { createWalletDaemonWithClient } from "../harness/helpers.js";
-import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
 
 const logger = new Logger("test-libeufin-bank.ts");
 
@@ -163,14 +162,19 @@ export async function runLibeufinBankTest(t: 
GlobalTestState) {
 
   const res = createEddsaKeyPair();
 
-  const wireGatewayApiClient = new WireGatewayApiClient(wireGatewayApiBaseUrl, 
{
-    auth: {
-      username: exchangeBankUsername,
-      password: exchangeBankPw,
+  // Not a normal client, but one with admin credentials,
+  // as /add-incoming is testing functionality only allowed by the admin.
+  const wireGatewayApiAdminClient = new WireGatewayApiClient(
+    wireGatewayApiBaseUrl,
+    {
+      auth: {
+        username: "admin",
+        password: "adminpw",
+      },
     },
-  });
+  );
 
-  await wireGatewayApiClient.adminAddIncoming({
+  await wireGatewayApiAdminClient.adminAddIncoming({
     amount: "TESTKUDOS:115",
     debitAccountPayto: bankUser.accountPaytoUri,
     reservePub: encodeCrock(res.eddsaPub),
diff --git 
a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts 
b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts
index f9f2df0fc..39389e3c6 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts
@@ -53,7 +53,7 @@ export async function runWithdrawalAbortBankTest(t: 
GlobalTestState) {
 
   // Abort it
 
-  await bankAccessApiClient.abortWithdrawalOperation(user.username, wop);
+  await bankAccessApiClient.abortWithdrawalOperation(wop);
 
   // Withdraw
 
diff --git a/packages/taler-util/src/bank-api-client.ts 
b/packages/taler-util/src/bank-api-client.ts
index 733c1b509..14c9b5f3f 100644
--- a/packages/taler-util/src/bank-api-client.ts
+++ b/packages/taler-util/src/bank-api-client.ts
@@ -415,11 +415,10 @@ export class TalerCorebankApiClient {
   }
 
   async abortWithdrawalOperation(
-    accountName: string,
     wopi: WithdrawalOperationInfo,
   ): Promise<void> {
     const url = new URL(
-      `accounts/${accountName}/withdrawals/${wopi.withdrawal_id}/abort`,
+      `withdrawals/${wopi.withdrawal_id}/abort`,
       this.baseUrl,
     );
     const resp = await this.httpLib.fetch(url.href, {

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