diff options
author | ms <ms@taler.net> | 2021-07-29 15:42:23 +0200 |
---|---|---|
committer | ms <ms@taler.net> | 2021-07-29 15:42:23 +0200 |
commit | 58c3a17b3e635563067eaaaabdd4620625b40db1 (patch) | |
tree | 679e4f6b0dcf00de52c27e83684e12adaf210842 | |
parent | 3450c1617f5e3da377d6736c8993a5ed470f7b99 (diff) | |
download | wallet-core-58c3a17b3e635563067eaaaabdd4620625b40db1.tar.xz |
Testing: convenience method to make default instances.
This will facilitate those tests needing a merchant
backend, since it is currently not possible to make
instances without having first a default instance defined.
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/harness.ts | 11 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts b/packages/taler-wallet-cli/src/integrationtests/harness.ts index da4639859..2f248d2a0 100644 --- a/packages/taler-wallet-cli/src/integrationtests/harness.ts +++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts @@ -1489,6 +1489,17 @@ export class MerchantService implements MerchantServiceInterface { config.write(this.configFilename); } + async addDefaultInstance(): Promise<void> { + return await this.addInstance({ + id: "default", + name: "Default Instance", + paytoUris: [`payto://x-taler-bank/merchant-default`], + auth: { + method: "external", + }, + }); + } + async addInstance( instanceConfig: PartialMerchantInstanceConfig, ): Promise<void> { diff --git a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts b/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts index dd7c60178..6a09de77d 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts @@ -81,7 +81,7 @@ export async function runBankApiTest(t: GlobalTestState) { await merchant.start(); await merchant.pingUntilAvailable(); - + await merchant.addDefaultInstance(); await merchant.addInstance({ id: "minst1", name: "minst1", |