diff options
author | ms <ms@taler.net> | 2021-07-30 09:46:19 +0200 |
---|---|---|
committer | ms <ms@taler.net> | 2021-07-30 09:46:19 +0200 |
commit | 2ccfa3c2f2e52e6d8f0d629b48aa522b0df9965c (patch) | |
tree | 68bd5e440f786d3dd01c951eb05eec9699d01863 /packages/taler-wallet-cli | |
parent | acf041d14442dfaa804dcf065db3ab2327ad7c70 (diff) |
testing: give option to restart merchant without DB reset.
Diffstat (limited to 'packages/taler-wallet-cli')
3 files changed, 8 insertions, 7 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts b/packages/taler-wallet-cli/src/integrationtests/harness.ts index 2f248d2a0..956255185 100644 --- a/packages/taler-wallet-cli/src/integrationtests/harness.ts +++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts @@ -1441,8 +1441,10 @@ export class MerchantService implements MerchantServiceInterface { } } - async start(): Promise<void> { - await exec(`taler-merchant-dbinit -r -c "${this.configFilename}"`); + async start( + withResetTables: boolean = true, // eventually, this should become a named parameter + ): Promise<void> { + await exec(`taler-merchant-dbinit ${withResetTables ? "-r" : ""} -c "${this.configFilename}"`); this.proc = this.globalState.spawnService( "taler-merchant-httpd", diff --git a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts b/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts index fc1ffb267..0b5c47551 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts @@ -53,7 +53,7 @@ async function revokeAllWalletCoins(req: { await exchange.keyup(); await delayMs(1000); await merchant.stop(); - await merchant.start(); + await merchant.start(false); // 'false' prevents DB reset await merchant.pingUntilAvailable(); } diff --git a/packages/taler-wallet-cli/src/integrationtests/test-tipping.ts b/packages/taler-wallet-cli/src/integrationtests/test-tipping.ts index 7675db119..3eb8109e5 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-tipping.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-tipping.ts @@ -63,10 +63,9 @@ export async function runTippingTest(t: GlobalTestState) { await exchange.runWirewatchOnce(); - // FIXME/WHY? Disabling for now, as start() erases the DB. - /*await merchant.stop(); - await merchant.start(); - await merchant.pingUntilAvailable();*/ + await merchant.stop(); + await merchant.start(false); + await merchant.pingUntilAvailable(); const r = await MerchantPrivateApi.queryTippingReserves(merchant, "default"); console.log("tipping reserves:", JSON.stringify(r, undefined, 2)); |