aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-payment-fault.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-06-21 08:54:14 +0200
committerFlorian Dold <florian@dold.me>2023-06-21 08:54:18 +0200
commitba913cd2ceccfe3b1472d95087317445df0073e9 (patch)
treebcc9d6bbd96245f7af8e40694e021b3561a01de9 /packages/taler-harness/src/integrationtests/test-payment-fault.ts
parent9f8faed2d170a37efa0328e42c83e6e5717bf06c (diff)
downloadwallet-core-ba913cd2ceccfe3b1472d95087317445df0073e9.tar.xz
harness: wallet must always withdraw via fault-injected exchange
Otherwise, the ports in the base URL don't match and the wallet will complain.
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-payment-fault.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-payment-fault.ts17
1 files changed, 10 insertions, 7 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-payment-fault.ts b/packages/taler-harness/src/integrationtests/test-payment-fault.ts
index 209830187..c1438a419 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-fault.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-fault.ts
@@ -71,7 +71,16 @@ export async function runPaymentFaultTest(t: GlobalTestState) {
"x",
);
- bank.setSuggestedExchange(exchange, exchangeBankAccount.accountPaytoUri);
+ const faultyExchange = new FaultInjectedExchangeService(t, exchange, 8091);
+ // Base URL must contain port that the proxy is listening on.
+ await exchange.modifyConfig(async (config) => {
+ config.setString("exchange", "base_url", "http://localhost:8091/");
+ });
+
+ bank.setSuggestedExchange(
+ faultyExchange,
+ exchangeBankAccount.accountPaytoUri,
+ );
await bank.start();
@@ -83,12 +92,6 @@ export async function runPaymentFaultTest(t: GlobalTestState) {
await exchange.start();
await exchange.pingUntilAvailable();
- const faultyExchange = new FaultInjectedExchangeService(t, exchange, 8091);
- // Base URL must contain port that the proxy is listening on.
- await exchange.modifyConfig(async (config) => {
- config.setString("exchange", "base_url", "http://localhost:8091/");
- });
-
// Print all requests to the exchange
faultyExchange.faultProxy.addFault({
async modifyRequest(ctx: FaultInjectionRequestContext) {