diff options
author | Florian Dold <florian@dold.me> | 2021-01-13 01:19:23 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-01-13 01:19:23 +0100 |
commit | 94e35ca70a53df81e513ca068eb71fd28a239c18 (patch) | |
tree | c6ac9122f4c9d058969672884d8a600dde4e4663 /packages/taler-wallet-cli/src/integrationtests/helpers.ts | |
parent | 096d21189c39a410935c63f1af0e4dd8cd7d4582 (diff) | |
download | wallet-core-94e35ca70a53df81e513ca068eb71fd28a239c18.tar.xz |
fix pay-abort integration test
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/helpers.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/helpers.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/helpers.ts b/packages/taler-wallet-cli/src/integrationtests/helpers.ts index f4e676b61..c51c306c9 100644 --- a/packages/taler-wallet-cli/src/integrationtests/helpers.ts +++ b/packages/taler-wallet-cli/src/integrationtests/helpers.ts @@ -45,7 +45,7 @@ import { ConfirmPayResultType, ContractTerms, } from "taler-wallet-core"; -import { FaultInjectedMerchantService } from "./faultInjection"; +import { FaultInjectedExchangeService, FaultInjectedMerchantService } from "./faultInjection"; import { defaultCoinConfig } from "./denomStructures"; export interface SimpleTestEnvironment { @@ -139,6 +139,7 @@ export interface FaultyMerchantTestEnvironment { commonDb: DbInfo; bank: BankService; exchange: ExchangeService; + faultyExchange: FaultInjectedExchangeService, exchangeBankAccount: ExchangeBankAccount; merchant: MerchantService; faultyMerchant: FaultInjectedMerchantService; @@ -176,6 +177,7 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( }); const faultyMerchant = new FaultInjectedMerchantService(t, merchant, 9083); + const faultyExchange = new FaultInjectedExchangeService(t, exchange, 9081); const exchangeBankAccount = await bank.createExchangeAccount( "MyExchange", @@ -183,7 +185,7 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( ); exchange.addBankAccount("1", exchangeBankAccount); - bank.setSuggestedExchange(exchange, exchangeBankAccount.accountPaytoUri); + bank.setSuggestedExchange(faultyExchange, exchangeBankAccount.accountPaytoUri); await bank.start(); @@ -194,7 +196,7 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( await exchange.start(); await exchange.pingUntilAvailable(); - merchant.addExchange(exchange); + merchant.addExchange(faultyExchange); await merchant.start(); await merchant.pingUntilAvailable(); @@ -223,6 +225,7 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( bank, exchangeBankAccount, faultyMerchant, + faultyExchange, }; } |