From 08bd143424deb9a79f131ba1c7968409f5866d63 Mon Sep 17 00:00:00 2001 From: MS Date: Fri, 5 Feb 2021 13:51:57 +0100 Subject: [PATCH] libeufin tutorial: testing bank connection --- .../src/integrationtests/libeufin.ts | 17 ++++++++++++++++- .../integrationtests/test-libeufin-tutorial.ts | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts index ad26a74ed..f84b7b982 100644 --- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts +++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts @@ -326,7 +326,7 @@ export class LibeufinCli { ` --ebics-url=${connectionDetails.ebicsUrl}` + ` --host-id=${connectionDetails.subscriberDetails.hostId}` + ` --partner-id=${connectionDetails.subscriberDetails.partnerId}` + - ` --ebics-user-id=${connectionDetails.subscriberDetails.partnerId}` + + ` --ebics-user-id=${connectionDetails.subscriberDetails.userId}` + ` ${connectionDetails.connectionName}`, { ...process.env, @@ -371,6 +371,21 @@ export class LibeufinCli { ); console.log(stdout); } + + async connect(connectionName: string): Promise { + const stdout = await sh( + this.globalTestState, + "libeufin-cli-connect", + `libeufin-cli connections connect ${connectionName}`, + { + ...process.env, + LIBEUFIN_NEXUS_URL: this.cliDetails.nexusUrl, + LIBEUFIN_NEXUS_USERNAME: this.cliDetails.user.username, + LIBEUFIN_NEXUS_PASSWORD: this.cliDetails.user.password, + }, + ); + console.log(stdout); + } } export namespace LibeufinSandboxApi { diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts index 4e5cdcef6..0b4cc0f89 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts @@ -94,4 +94,5 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) { outputFile: `${t.testDir}/letter.pdf`, connectionName: connectionDetails.connectionName, }); + await libeufinCli.connect(connectionDetails.connectionName); }