diff options
Diffstat (limited to 'packages/taler-harness/src')
3 files changed, 15 insertions, 9 deletions
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index 65a19959a..c16200933 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -654,6 +654,9 @@ export class FakebankService return this.baseUrl; } + // FIXME: Why do we have this function at all? + // We now have a unified corebank API, we should just use that + // to create bank accounts, also for the exchange. async createExchangeAccount( accountName: string, password: string, diff --git a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts index 449142809..def2462e0 100644 --- a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts +++ b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts @@ -136,20 +136,22 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) { }, ); - await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); - let p: PendingOperationsResponse; p = await walletClient.call(WalletApiOperation.GetPendingOperations, {}); console.log("pending operations after first time travel"); console.log(JSON.stringify(p, undefined, 2)); - await withdrawViaBankV2(t, { + await walletClient.call(WalletApiOperation.TestingWaitTasksProcessed, {}); + await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); + + const wres2 = await withdrawViaBankV2(t, { walletClient, bank, exchange, amount: "TESTKUDOS:20", }); + await wres2.withdrawalFinishedCond; await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); @@ -165,12 +167,13 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) { }, ); + await walletClient.call(WalletApiOperation.TestingWaitTasksProcessed, {}); + await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); + // At this point, the original coins should've been refreshed. // It would be too late to refresh them now, as we're past // the two year deposit expiration. - await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); - const orderResp = await merchantClient.createOrder({ order: { fulfillment_url: "http://example.com", @@ -195,7 +198,7 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) { t.assertTrue(r.status === PreparePayResultType.PaymentPossible); const cpr = await walletClient.call(WalletApiOperation.ConfirmPay, { - proposalId: r.proposalId, + transactionId: r.transactionId, }); t.assertTrue(cpr.type === ConfirmPayResultType.Done); diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts index e3057451e..e26d9f964 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts @@ -55,12 +55,14 @@ export async function runWithdrawalFakebankTest(t: GlobalTestState) { accountName: "exchange", accountPassword: "x", wireGatewayApiBaseUrl: new URL( - "/accounts/exchange/taler-wire-gateway", + "/accounts/exchange/taler-wire-gateway/", bank.baseUrl, ).href, accountPaytoUri: "payto://x-taler-bank/localhost/exchange", }); + await bank.createExchangeAccount("exchange", "x"); + await bank.start(); await bank.pingUntilAvailable(); @@ -93,8 +95,6 @@ export async function runWithdrawalFakebankTest(t: GlobalTestState) { const balResp = await wallet.client.call(WalletApiOperation.GetBalances, {}); t.assertAmountEquals("TESTKUDOS:9.72", balResp.balances[0].available); - - await t.shutdown(); } runWithdrawalFakebankTest.suites = ["wallet"]; |