Libeufin tests.

Adding the CLI command that submits a initiated payment,
plus calling it from the 'tutorial' test case.
This commit is contained in:
MS 2021-05-03 11:12:46 +02:00
parent eaa5aba4e2
commit 4397e96cc8
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 18 additions and 0 deletions

View File

@ -617,6 +617,23 @@ export class LibeufinCli {
);
console.log(stdout);
}
async submitPayment(details: LibeufinPreparedPaymentDetails, paymentUuid: string): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-submitpayment",
`libeufin-cli accounts submit-payment` +
` --payment-uuid=${paymentUuid}` +
` ${details.nexusBankAccountName}`,
{
...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

@ -116,4 +116,5 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) {
nexusBankAccountName: bankAccountImportDetails.nexusBankAccountName,
};
await libeufinCli.preparePayment(paymentDetails);
await libeufinCli.submitPayment(paymentDetails, "1");
}