From 2b1e808d553d21beba3bafa09ef606035fcdb378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20=C3=81valos?= Date: Tue, 14 May 2024 14:10:47 -0600 Subject: harness: run withdrawal-handover against libeufin --- .../integrationtests/test-withdrawal-handover.ts | 30 ++++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'packages') 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, }); -- cgit v1.2.3