diff options
author | Florian Dold <florian@dold.me> | 2022-06-01 10:14:23 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-06-01 10:14:23 +0200 |
commit | 59a2119dcb70d0cc1c662c59e8db947dbc839d4c (patch) | |
tree | ba27f53dac78659ce30812817bbbfa0a2b1f3528 /packages/taler-wallet-cli | |
parent | 1ea28c5be15cdc6f9fd9f1413f70f77e1c159116 (diff) |
integration tests: one variable for pybank/libeufin switch
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/src/harness/harness.ts | 11 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/testrunner.ts | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/packages/taler-wallet-cli/src/harness/harness.ts b/packages/taler-wallet-cli/src/harness/harness.ts index b0b4a137a..b53047e5d 100644 --- a/packages/taler-wallet-cli/src/harness/harness.ts +++ b/packages/taler-wallet-cli/src/harness/harness.ts @@ -856,6 +856,9 @@ class PybankService extends BankServiceBase implements BankServiceHandle { } } +// Use libeufin bank instead of pybank. +const useLibeufinBank = process.env.WALLET_HARNESS_WITH_EUFIN; + /** * Return a euFin or a pyBank implementation of * the exported BankService class. This allows @@ -866,7 +869,7 @@ function getBankServiceImpl(): { prototype: typeof PybankService.prototype; create: typeof PybankService.create; } { - if (process.env.WALLET_HARNESS_WITH_EUFIN) + if (useLibeufinBank) return { prototype: EufinBankService.prototype, create: EufinBankService.create, @@ -1003,7 +1006,7 @@ export class ExchangeService implements ExchangeServiceInterface { } async runWirewatchOnce() { - if (process.env.WALLET_HARNESS_WITH_EUFIN) { + if (useLibeufinBank) { // Not even 2 secods showed to be enough! await waitMs(4000); } @@ -2016,7 +2019,7 @@ export function getRandomIban(salt: string | null = null): string { // Only used in one tipping test. export function getWireMethod(): string { - if (process.env.WALLET_HARNESS_WITH_EUFIN) return "iban"; + if (useLibeufinBank) return "iban"; return "x-taler-bank"; } @@ -2025,7 +2028,7 @@ export function getWireMethod(): string { * on whether the banking is served by euFin or Pybank. */ export function getPayto(label: string): string { - if (process.env.WALLET_HARNESS_WITH_EUFIN) + if (useLibeufinBank) return `payto://iban/SANDBOXX/${getRandomIban( label, )}?receiver-name=${label}`; diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts index dcbf84497..db66aa7d7 100644 --- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts +++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts @@ -222,7 +222,7 @@ export async function runTests(spec: TestRunSpec) { path.join(os.tmpdir(), "taler-integrationtests-"), ); updateCurrentSymlink(testRootDir); - console.log("testsuite root directory: ", testRootDir); + console.log(`testsuite root directory: ${testRootDir}`); const testResults: TestRunResult[] = []; |