[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: Fix libeufin refund test.
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: Fix libeufin refund test. |
Date: |
Fri, 30 Jul 2021 10:54:06 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 263b1e77 Fix libeufin refund test.
263b1e77 is described below
commit 263b1e77511cb6afa91a40a5576ca0753be9ebc2
Author: ms <ms@taler.net>
AuthorDate: Fri Jul 30 10:53:26 2021 +0200
Fix libeufin refund test.
The ingestion needed a delay to take place.
---
.../src/integrationtests/test-libeufin-refund.ts | 27 +++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git
a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts
index 4cd943f5..55a1f0c6 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts
@@ -17,7 +17,7 @@
/**
* Imports.
*/
-import { GlobalTestState } from "./harness";
+import { GlobalTestState, delayMs } from "./harness";
import {
SandboxUserBundle,
NexusUserBundle,
@@ -71,15 +71,37 @@ export async function runLibeufinRefundTest(t:
GlobalTestState) {
"EUR",
);
+ // check payment shows up in the Sandbox' history.
+ // NOTE: the debitor account has no entry so far, because
+ // the call above is a mere test method that books only one
+ // CRDT transaction.
+ const txsCredit = await LibeufinSandboxApi.getAccountTransactions(
+ libeufinServices.libeufinSandbox,
+ user02sandbox.ebicsBankAccount["label"]);
+ t.assertTrue(txsCredit["payments"].length == 1);
+
+ // Gets the faulty payment in the (ingested) history.
await LibeufinNexusApi.fetchAllTransactions(
libeufinServices.libeufinNexus,
user02nexus.localAccountName,
);
+ // Give time to ingest.
+ delayMs(2000);
+
+ // Check payment shows up in Nexus history.
+ const nexusTxs = await LibeufinNexusApi.getAccountTransactions(
+ libeufinServices.libeufinNexus,
+ user02nexus.localAccountName,
+ );
+ t.assertTrue(nexusTxs.data["transactions"].length == 1);
+ // This should pay the faulty payment back.
await LibeufinNexusApi.submitInitiatedPayment(
libeufinServices.libeufinNexus,
user02nexus.localAccountName,
- "1", // so far the only one that can exist.
+ // The initiated payment ID below got set by the Taler
+ // facade; at this point only one can / must exist.
+ "1",
);
// Counterpart checks whether the reimbursement shows up.
@@ -87,7 +109,6 @@ export async function runLibeufinRefundTest(t:
GlobalTestState) {
libeufinServices.libeufinSandbox,
user01sandbox.ebicsBankAccount["label"],
);
-
t.assertTrue(history["payments"].length == 1);
}
runLibeufinRefundTest.suites = ["libeufin"];
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: Fix libeufin refund test.,
gnunet <=