test libeufin facade creation CLI

This commit is contained in:
Florian Dold 2021-08-03 14:00:42 +02:00
parent 74b2d2fec5
commit a123569677
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 49 additions and 0 deletions

View File

@ -696,6 +696,46 @@ export class LibeufinCli {
);
console.log(stdout);
}
async newTalerWireGatewayFacade(req: NewTalerWireGatewayReq): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-new-taler-wire-gateway-facade",
`libeufin-cli facades new-taler-wire-gateway-facade` +
` --currency ${req.currency}` +
` --facade-name ${req.facadeName}` +
` ${req.connectionName} ${req.accountName}`,
{
...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);
}
async listFacades(): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-facades-list",
`libeufin-cli facades list`,
{
...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);
}
}
interface NewTalerWireGatewayReq {
facadeName: string;
connectionName: string;
accountName: string;
currency: string;
}
export namespace LibeufinSandboxApi {

View File

@ -117,5 +117,14 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) {
};
await libeufinCli.preparePayment(paymentDetails);
await libeufinCli.submitPayment(paymentDetails, "1");
await libeufinCli.newTalerWireGatewayFacade({
accountName: bankAccountImportDetails.nexusBankAccountName,
connectionName: "my-ebics-conn",
currency: "EUR",
facadeName: "my-twg",
});
await libeufinCli.listFacades();
}
runLibeufinTutorialTest.suites = ["libeufin"];