libeufin tutorial: testing bank connection

This commit is contained in:
MS 2021-02-05 13:51:57 +01:00
parent f234eef469
commit 08bd143424
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 17 additions and 1 deletions

View File

@ -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<void> {
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 {

View File

@ -94,4 +94,5 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) {
outputFile: `${t.testDir}/letter.pdf`,
connectionName: connectionDetails.connectionName,
});
await libeufinCli.connect(connectionDetails.connectionName);
}