diff options
author | Florian Dold <florian@dold.me> | 2023-06-21 06:59:34 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-06-21 06:59:40 +0200 |
commit | 7dcfd02dae23fe2a6249893ae19ab59b8b5a09f5 (patch) | |
tree | 7a0c828b54e0745f7ac5ddda91e34a69e56f4601 /packages/taler-harness/src/harness/helpers.ts | |
parent | 34e2fd51e038d26c9ea1c0c6770148640669518f (diff) | |
download | wallet-core-7dcfd02dae23fe2a6249893ae19ab59b8b5a09f5.tar.xz |
harness: fix exchange base URL in tests with fault injection
Diffstat (limited to 'packages/taler-harness/src/harness/helpers.ts')
-rw-r--r-- | packages/taler-harness/src/harness/helpers.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index bc2f573e9..fd6e9aa2e 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -406,6 +406,11 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( const faultyMerchant = new FaultInjectedMerchantService(t, merchant, 9083); const faultyExchange = new FaultInjectedExchangeService(t, exchange, 9081); + // Base URL must contain port that the proxy is listening on. + await exchange.modifyConfig(async (config) => { + config.setString("exchange", "base_url", "http://localhost:9081/"); + }); + const exchangeBankAccount = await bank.createExchangeAccount( "myexchange", "x", @@ -546,8 +551,9 @@ export async function withdrawViaBankV2( }, ); - const withdrawalFinishedCond = wallet.waitForNotificationCond((x) => - x.type === NotificationType.TransactionStateTransition && + const withdrawalFinishedCond = wallet.waitForNotificationCond( + (x) => + x.type === NotificationType.TransactionStateTransition && x.newTxState.major === TransactionMajorState.Done && x.transactionId === acceptRes.transactionId, ); |