diff options
author | Florian Dold <florian@dold.me> | 2022-01-24 20:34:29 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-01-24 20:34:29 +0100 |
commit | ee492b255267b6cb2ceaa4aee065a5d690177ef5 (patch) | |
tree | 56bb12c279b8942ec3306a6b7b16f0ce26db9469 | |
parent | 2f291847b08440c6da63351a0cfec482682170ae (diff) |
fixes in integration tests, run fakebank with ram limit
3 files changed, 8 insertions, 6 deletions
diff --git a/packages/taler-wallet-cli/src/harness/harness.ts b/packages/taler-wallet-cli/src/harness/harness.ts index 696a112a2..fc155ba6a 100644 --- a/packages/taler-wallet-cli/src/harness/harness.ts +++ b/packages/taler-wallet-cli/src/harness/harness.ts @@ -67,6 +67,7 @@ import { getRandomBytes, hash, stringToBytes, + j2s, } from "@gnu-taler/taler-util"; import { CoinConfig } from "./denomStructures.js"; import { LibeufinNexusApi, LibeufinSandboxApi } from "./libeufin-apis.js"; @@ -319,7 +320,7 @@ export class GlobalTestState { console.log(`could not start process (${command})`, err); }); proc.on("exit", (code, signal) => { - console.log(`process ${logName} exited`); + console.log(`process ${logName} exited ${j2s({ code, signal })}`); }); const stderrLogFileName = this.testDir + `/${logName}-stderr.log`; const stderrLog = fs.createWriteStream(stderrLogFileName, { @@ -454,7 +455,7 @@ export async function pingProc( //console.log(e); await delayMs(1000); } - if (!proc || proc.proc.exitCode !== null) { + if (!proc || proc.proc.exitCode != null || proc.proc.signalCode != null) { throw Error(`service process ${serviceName} stopped unexpectedly`); } } @@ -1044,6 +1045,7 @@ export class FakeBankService { setTalerPaths(config, gc.testDir + "/talerhome"); config.setString("taler", "currency", bc.currency); config.setString("bank", "http_port", `${bc.httpPort}`); + config.setString("bank", "ram_limit", `${1024}`); const cfgFilename = gc.testDir + "/bank.conf"; config.write(cfgFilename); return new FakeBankService(gc, bc, cfgFilename); diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-fakebank.ts b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-fakebank.ts index 97beba1bf..abd25d282 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-fakebank.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-fakebank.ts @@ -33,7 +33,7 @@ import { URL } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. */ -export async function runTestWithdrawalFakebankTest(t: GlobalTestState) { +export async function runWithdrawalFakebankTest(t: GlobalTestState) { // Set up test environment const db = await setupDb(t); @@ -93,4 +93,4 @@ export async function runTestWithdrawalFakebankTest(t: GlobalTestState) { await t.shutdown(); } -runTestWithdrawalFakebankTest.suites = ["wallet"]; +runWithdrawalFakebankTest.suites = ["wallet"]; diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts index d985ed67f..98aab75c4 100644 --- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts +++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts @@ -87,7 +87,7 @@ import { runPaymentZeroTest } from "./test-payment-zero.js"; import { runMerchantSpecPublicOrdersTest } from "./test-merchant-spec-public-orders.js"; import { runExchangeTimetravelTest } from "./test-exchange-timetravel.js"; import { runDenomUnofferedTest } from "./test-denom-unoffered.js"; -import { runTestWithdrawalFakebankTest } from "./test-withdrawal-fakebank.js"; +import { runWithdrawalFakebankTest } from "./test-withdrawal-fakebank.js"; /** * Test runner. @@ -155,7 +155,7 @@ const allTests: TestMainFunction[] = [ runRefundTest, runRevocationTest, runTestWithdrawalManualTest, - runTestWithdrawalFakebankTest, + runWithdrawalFakebankTest, runTimetravelAutorefreshTest, runTimetravelWithdrawTest, runTippingTest, |