diff options
author | Florian Dold <florian@dold.me> | 2023-09-05 10:46:06 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-09-05 10:48:41 +0200 |
commit | a60a1d867cfe6a12f1e6fadfa037f022e9385107 (patch) | |
tree | bc77a92b327cd0e4933fa4b3fe15f1c775e24235 /packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts | |
parent | e1d86816a7c07cb8ca2d54676d5cdbbe513f2ba7 (diff) | |
download | wallet-core-a60a1d867cfe6a12f1e6fadfa037f022e9385107.tar.xz |
harness: remove deprecated testing APIs
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts index e18cd7a0f..2a8ae39d8 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts @@ -41,10 +41,10 @@ import { WalletCli, } from "../harness/harness.js"; import { + createWalletDaemonWithClient, FaultyMerchantTestEnvironment, - withdrawViaBank, + withdrawViaBankV2, } from "../harness/helpers.js"; -import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; /** * Run a test case with a simple TESTKUDOS Taler environment, consisting @@ -110,13 +110,13 @@ export async function createConfusedMerchantTestkudosEnvironment( await merchant.start(); await merchant.pingUntilAvailable(); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "default", name: "Default Instance", paytoUris: [getPayto("merchant-default")], }); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "minst1", name: "minst1", paytoUris: [getPayto("minst1")], @@ -124,13 +124,15 @@ export async function createConfusedMerchantTestkudosEnvironment( console.log("setup done!"); - const wallet = new WalletCli(t); + const { walletClient } = await createWalletDaemonWithClient(t, { + name: "default", + }); return { commonDb: db, exchange, merchant, - wallet, + walletClient, bank, exchangeBankAccount, faultyMerchant, @@ -145,13 +147,13 @@ export async function createConfusedMerchantTestkudosEnvironment( export async function runMerchantExchangeConfusionTest(t: GlobalTestState) { // Set up test environment - const { wallet, bank, faultyExchange, faultyMerchant } = + const { walletClient, bank, faultyExchange, faultyMerchant } = await createConfusedMerchantTestkudosEnvironment(t); // Withdraw digital cash into the wallet. - await withdrawViaBank(t, { - wallet, + await withdrawViaBankV2(t, { + walletClient, bank, exchange: faultyExchange, amount: "TESTKUDOS:20", @@ -200,7 +202,7 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) { console.log(pubUnpaidStatus); - let preparePayResp = await wallet.client.call( + let preparePayResp = await walletClient.call( WalletApiOperation.PreparePayForUri, { talerPayUri: pubUnpaidStatus.taler_pay_uri, @@ -231,7 +233,7 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) { await publicOrderStatusResp.json(), ); - const confirmPayRes = await wallet.client.call( + const confirmPayRes = await walletClient.call( WalletApiOperation.ConfirmPay, { proposalId: proposalId, |