diff options
author | Florian Dold <florian@dold.me> | 2022-03-07 23:57:25 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-07 23:57:25 +0100 |
commit | 3aa0b812f476791b3c3feddb1421e212cf981b3c (patch) | |
tree | 223cb60fb18d7c97d409a3e4a5d555daacb04623 /packages/taler-wallet-cli/src/harness/helpers.ts | |
parent | 6df92029353d70195a7e7d989719e674473b0587 (diff) |
wallet: fix withdrawal in timetravel test
Diffstat (limited to 'packages/taler-wallet-cli/src/harness/helpers.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/harness/helpers.ts | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/packages/taler-wallet-cli/src/harness/helpers.ts b/packages/taler-wallet-cli/src/harness/helpers.ts index a5d3b3150..f19c6a115 100644 --- a/packages/taler-wallet-cli/src/harness/helpers.ts +++ b/packages/taler-wallet-cli/src/harness/helpers.ts @@ -24,35 +24,35 @@ * Imports */ import { - FaultInjectedExchangeService, - FaultInjectedMerchantService, -} from "./faultInjection"; -import { CoinConfig, defaultCoinConfig } from "./denomStructures"; -import { AmountString, - Duration, + ConfirmPayResultType, ContractTerms, + Duration, PreparePayResultType, - ConfirmPayResultType, } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { CoinConfig, defaultCoinConfig } from "./denomStructures.js"; import { - DbInfo, + FaultInjectedExchangeService, + FaultInjectedMerchantService, +} from "./faultInjection.js"; +import { + BankAccessApi, + BankApi, BankService, + DbInfo, ExchangeService, - MerchantService, - WalletCli, - GlobalTestState, - setupDb, ExchangeServiceInterface, - BankApi, - BankAccessApi, - MerchantServiceInterface, - MerchantPrivateApi, + getPayto, + GlobalTestState, HarnessExchangeBankAccount, + MerchantPrivateApi, + MerchantService, + MerchantServiceInterface, + setupDb, + WalletCli, WithAuthorization, - getPayto, } from "./harness.js"; -import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; export interface SimpleTestEnvironment { commonDb: DbInfo; @@ -242,7 +242,9 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( } /** - * Withdraw balance. + * Start withdrawing into the wallet. + * + * Only starts the operation, does not wait for it to finish. */ export async function startWithdrawViaBank( t: GlobalTestState, @@ -277,8 +279,8 @@ export async function startWithdrawViaBank( await BankApi.confirmWithdrawalOperation(bank, user, wop); - await wallet.runPending(); - await wallet.runUntilDone(); + // We do *not* call runPending / runUntilDone on the wallet here. + // Some tests rely on the final withdraw failing. } /** |