Libeufin tests.
Adding the CLI command that submits a initiated payment, plus calling it from the 'tutorial' test case.
This commit is contained in:
parent
eaa5aba4e2
commit
4397e96cc8
@ -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 {
|
||||
|
@ -116,4 +116,5 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) {
|
||||
nexusBankAccountName: bankAccountImportDetails.nexusBankAccountName,
|
||||
};
|
||||
await libeufinCli.preparePayment(paymentDetails);
|
||||
await libeufinCli.submitPayment(paymentDetails, "1");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user