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> {
|
async start(
|
||||||
await exec(`taler-merchant-dbinit -r -c "${this.configFilename}"`);
|
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(
|
this.proc = this.globalState.spawnService(
|
||||||
"taler-merchant-httpd",
|
"taler-merchant-httpd",
|
||||||
|
@ -53,7 +53,7 @@ async function revokeAllWalletCoins(req: {
|
|||||||
await exchange.keyup();
|
await exchange.keyup();
|
||||||
await delayMs(1000);
|
await delayMs(1000);
|
||||||
await merchant.stop();
|
await merchant.stop();
|
||||||
await merchant.start();
|
await merchant.start(false); // 'false' prevents DB reset
|
||||||
await merchant.pingUntilAvailable();
|
await merchant.pingUntilAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,10 +63,9 @@ export async function runTippingTest(t: GlobalTestState) {
|
|||||||
|
|
||||||
await exchange.runWirewatchOnce();
|
await exchange.runWirewatchOnce();
|
||||||
|
|
||||||
// FIXME/WHY? Disabling for now, as start() erases the DB.
|
await merchant.stop();
|
||||||
/*await merchant.stop();
|
await merchant.start(false);
|
||||||
await merchant.start();
|
await merchant.pingUntilAvailable();
|
||||||
await merchant.pingUntilAvailable();*/
|
|
||||||
|
|
||||||
const r = await MerchantPrivateApi.queryTippingReserves(merchant, "default");
|
const r = await MerchantPrivateApi.queryTippingReserves(merchant, "default");
|
||||||
console.log("tipping reserves:", JSON.stringify(r, undefined, 2));
|
console.log("tipping reserves:", JSON.stringify(r, undefined, 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user