diff options
author | MS <ms@taler.net> | 2021-05-03 11:12:46 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2021-05-03 11:12:46 +0200 |
commit | 4397e96cc8b94a377df7a6b85ee6b54018c88df2 (patch) | |
tree | 386d8aae42ab294e513dadf93cbc57ab2a8d70a8 | |
parent | eaa5aba4e21dbf86a27860575f8f22a80993e0f3 (diff) |
Libeufin tests.
Adding the CLI command that submits a initiated payment,
plus calling it from the 'tutorial' test case.
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/libeufin.ts | 17 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts index 480dadbe5..3cca9f8d7 100644 --- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts +++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts @@ -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 { 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 271eedbc2..b5e8f093a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts @@ -116,4 +116,5 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) { nexusBankAccountName: bankAccountImportDetails.nexusBankAccountName, }; await libeufinCli.preparePayment(paymentDetails); + await libeufinCli.submitPayment(paymentDetails, "1"); } |