diff options
| author | Florian Dold <florian@dold.me> | 2023-05-05 14:56:28 +0200 | 
|---|---|---|
| committer | Florian Dold <florian@dold.me> | 2023-05-05 14:56:33 +0200 | 
| commit | 9a412260f3b0a53b1508e2db8724a0c58ce080cf (patch) | |
| tree | 40c495c9ec97ab8e2631076eeec2c8165a561d88 /packages/taler-harness/src/integrationtests | |
| parent | 990b056071fd0b3879d4366ff3dd625aa3265738 (diff) | |
adapt to merchant API breaking changes
Diffstat (limited to 'packages/taler-harness/src/integrationtests')
| -rw-r--r-- | packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts | 14 | ||||
| -rw-r--r-- | packages/taler-harness/src/integrationtests/test-tipping.ts | 18 | 
2 files changed, 21 insertions, 11 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts index 38cbd6925..c4db7022d 100644 --- a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts @@ -26,6 +26,7 @@ import { defaultCoinConfig } from "../harness/denomStructures.js";  import {    getWireMethodForTest,    GlobalTestState, +  MerchantApiClient,    MerchantPrivateApi,    WalletCli,  } from "../harness/harness.js"; @@ -55,6 +56,13 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) {      },    ); +  const merchantClient = new MerchantApiClient( +    merchant.makeInstanceBaseUrl("default"), +    { +      method: "external", +    }, +  ); +    const walletTwo = new WalletCli(t, "walletTwo");    const walletThree = new WalletCli(t, "walletThree"); @@ -147,9 +155,7 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) {    // Pay with coin from tipping    {      const mbu = await BankApi.createRandomBankUser(bank); -    const tipReserveResp = await MerchantPrivateApi.createTippingReserve( -      merchant, -      "default", +    const tipReserveResp = await merchantClient.createTippingReserve(        {          exchange_url: exchange.baseUrl,          initial_balance: "TESTKUDOS:10", @@ -158,7 +164,7 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) {      );      t.assertDeepEqual( -      tipReserveResp.payto_uri, +      tipReserveResp.accounts[0].payto_uri,        exchangeBankAccount.accountPaytoUri,      ); diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts index b124fbf0d..bbf729420 100644 --- a/packages/taler-harness/src/integrationtests/test-tipping.ts +++ b/packages/taler-harness/src/integrationtests/test-tipping.ts @@ -24,6 +24,7 @@ import {  } from "@gnu-taler/taler-wallet-core";  import {    GlobalTestState, +  MerchantApiClient,    MerchantPrivateApi,    getWireMethodForTest,  } from "../harness/harness.js"; @@ -40,20 +41,23 @@ export async function runTippingTest(t: GlobalTestState) {    const mbu = await BankApi.createRandomBankUser(bank); -  const tipReserveResp = await MerchantPrivateApi.createTippingReserve( -    merchant, -    "default", +  const merchantClient = new MerchantApiClient( +    merchant.makeInstanceBaseUrl("default"),      { -      exchange_url: exchange.baseUrl, -      initial_balance: "TESTKUDOS:10", -      wire_method: getWireMethodForTest(), +      method: "external",      },    ); +  const tipReserveResp = await merchantClient.createTippingReserve({ +    exchange_url: exchange.baseUrl, +    initial_balance: "TESTKUDOS:10", +    wire_method: getWireMethodForTest(), +  }); +    console.log("tipReserveResp:", tipReserveResp);    t.assertDeepEqual( -    tipReserveResp.payto_uri, +    tipReserveResp.accounts[0].payto_uri,      exchangeBankAccount.accountPaytoUri,    );  | 
