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.
This commit is contained in:
ms 2021-07-29 15:42:23 +02:00
parent 3450c1617f
commit 58c3a17b3e
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 12 additions and 1 deletions

View File

@ -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> {

View File

@ -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",