aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2024-05-14 14:10:47 -0600
committerIván Ávalos <avalos@disroot.org>2024-05-15 09:41:30 -0600
commit2b1e808d553d21beba3bafa09ef606035fcdb378 (patch)
tree52f68b7db364a379a00e5952a53f3eb862e73be2 /packages
parent0d1af998c3479a3d5ba297e1e0c2eba4a49dbe98 (diff)
downloadwallet-core-2b1e808d553d21beba3bafa09ef606035fcdb378.tar.xz
harness: run withdrawal-handover against libeufin
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts30
1 files changed, 13 insertions, 17 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts
index 23c0f938c..aed266eb0 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts
@@ -27,7 +27,7 @@ import {
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState } from "../harness/harness.js";
import {
- createSimpleTestkudosEnvironmentV2,
+ createSimpleTestkudosEnvironmentV3,
createWalletDaemonWithClient,
} from "../harness/helpers.js";
@@ -37,19 +37,17 @@ import {
export async function runWithdrawalHandoverTest(t: GlobalTestState) {
// Set up test environment
- const { walletClient, bank, exchange } =
- await createSimpleTestkudosEnvironmentV2(t);
+ const { walletClient, bankClient, exchange } =
+ await createSimpleTestkudosEnvironmentV3(t);
// Do one normal withdrawal with the new split API
{
// Create a withdrawal operation
- const bankAccessApiClient = new TalerCorebankApiClient(
- bank.corebankApiBaseUrl,
- );
- const user = await bankAccessApiClient.createRandomBankUser();
- bankAccessApiClient.setAuth(user);
- const wop = await bankAccessApiClient.createWithdrawalOperation(
+ const user = await bankClient.createRandomBankUser();
+ const userBankClient = new TalerCorebankApiClient(bankClient.baseUrl);
+ userBankClient.setAuth(user);
+ const wop = await userBankClient.createWithdrawalOperation(
user.username,
"TESTKUDOS:10",
);
@@ -90,7 +88,7 @@ export async function runWithdrawalHandoverTest(t: GlobalTestState) {
},
});
- await bankAccessApiClient.confirmWithdrawalOperation(user.username, {
+ await userBankClient.confirmWithdrawalOperation(user.username, {
withdrawalOperationId: wop.withdrawal_id,
});
@@ -112,12 +110,10 @@ export async function runWithdrawalHandoverTest(t: GlobalTestState) {
// Create a withdrawal operation
- const bankAccessApiClient = new TalerCorebankApiClient(
- bank.corebankApiBaseUrl,
- );
- const user = await bankAccessApiClient.createRandomBankUser();
- bankAccessApiClient.setAuth(user);
- const wop = await bankAccessApiClient.createWithdrawalOperation(
+ const user = await bankClient.createRandomBankUser();
+ const userBankClient = new TalerCorebankApiClient(bankClient.baseUrl);
+ userBankClient.setAuth(user);
+ const wop = await userBankClient.createWithdrawalOperation(
user.username,
"TESTKUDOS:10",
);
@@ -159,7 +155,7 @@ export async function runWithdrawalHandoverTest(t: GlobalTestState) {
},
});
- await bankAccessApiClient.confirmWithdrawalOperation(user.username, {
+ await userBankClient.confirmWithdrawalOperation(user.username, {
withdrawalOperationId: wop.withdrawal_id,
});