testing: give option to restart merchant without DB reset.
This commit is contained in:
parent
acf041d144
commit
2ccfa3c2f2
@ -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",
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user