[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 02/02: harness: fix libeufin-bank test
From: |
gnunet |
Subject: |
[taler-wallet-core] 02/02: harness: fix libeufin-bank test |
Date: |
Mon, 13 Nov 2023 13:02:35 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
commit 6ab8e563f24c7f4f5bc9c06f063e1f6319c53a88
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Nov 13 13:02:32 2023 +0100
harness: fix libeufin-bank test
---
packages/taler-harness/src/harness/harness.ts | 12 +++++++++++-
.../src/integrationtests/test-libeufin-bank.ts | 17 +++++++++++------
2 files changed, 22 insertions(+), 7 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 fc0dc6eda..8f5cc8a35 100644
--- a/packages/taler-harness/src/integrationtests/test-libeufin-bank.ts
+++ b/packages/taler-harness/src/integrationtests/test-libeufin-bank.ts
@@ -162,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),
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.