aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli/src/integrationtests
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-07 23:57:25 +0100
committerFlorian Dold <florian@dold.me>2022-03-07 23:57:25 +0100
commit3aa0b812f476791b3c3feddb1421e212cf981b3c (patch)
tree223cb60fb18d7c97d409a3e4a5d555daacb04623 /packages/taler-wallet-cli/src/integrationtests
parent6df92029353d70195a7e7d989719e674473b0587 (diff)
downloadwallet-core-3aa0b812f476791b3c3feddb1421e212cf981b3c.tar.xz
wallet: fix withdrawal in timetravel test
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests')
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts20
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts
index 2ff857057..9335af9f5 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts
@@ -17,14 +17,14 @@
/**
* Imports.
*/
+import { Duration, TransactionType } from "@gnu-taler/taler-util";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState } from "../harness/harness.js";
import {
createSimpleTestkudosEnvironment,
- withdrawViaBank,
startWithdrawViaBank,
+ withdrawViaBank,
} from "../harness/helpers.js";
-import { Duration, TransactionType } from "@gnu-taler/taler-util";
-import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/**
* Basic time travel test.
@@ -32,12 +32,8 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
export async function runTimetravelWithdrawTest(t: GlobalTestState) {
// Set up test environment
- const {
- wallet,
- bank,
- exchange,
- merchant,
- } = await createSimpleTestkudosEnvironment(t);
+ const { wallet, bank, exchange, merchant } =
+ await createSimpleTestkudosEnvironment(t);
// Withdraw digital cash into the wallet.
@@ -61,6 +57,8 @@ export async function runTimetravelWithdrawTest(t: GlobalTestState) {
await merchant.start();
await merchant.pingUntilAvailable();
+ console.log("starting withdrawal via bank");
+
// This should fail, as the wallet didn't time travel yet.
await startWithdrawViaBank(t, {
wallet,
@@ -69,9 +67,13 @@ export async function runTimetravelWithdrawTest(t: GlobalTestState) {
amount: "TESTKUDOS:20",
});
+ console.log("starting withdrawal done");
+
// Check that transactions are correct for the failed withdrawal
{
+ console.log("running until done (should run into maxRetries limit)");
await wallet.runUntilDone({ maxRetries: 5 });
+ console.log("wallet done running");
const transactions = await wallet.client.call(
WalletApiOperation.GetTransactions,
{},