gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: Get add-incoming test to pass.


From: gnunet
Subject: [libeufin] branch master updated: Get add-incoming test to pass.
Date: Tue, 15 Dec 2020 00:11:41 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 831eed3  Get add-incoming test to pass.
831eed3 is described below

commit 831eed3d6cbcff7ce9a2e2e9d230f16ef250f88a
Author: MS <ms@taler.net>
AuthorDate: Tue Dec 15 00:11:28 2020 +0100

    Get add-incoming test to pass.
---
 integration-tests/tests.py                         | 22 +++++++++++++++++++---
 nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt |  1 +
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index 8cecec2..fe15cf8 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -259,16 +259,32 @@ def test_taler_facade_config(make_taler_facade):
 
 
 def test_taler_facade_incoming(make_taler_facade):
-    assertResponse(post(
+    resp = assertResponse(post(
         
f"{PERSONA.nexus.base_url}/facades/{PERSONA.nexus.taler_facade_name}/taler/admin/add-incoming",
         json=dict(
             amount="EUR:1",
-            reserve_pub="not ingested for now",
-            debit_account="payto://iban/THEIBAN/THEBIC?sender-name=TheName"
+            reserve_pub="1BCZ7KA333E3YJBFWT4J173M3E713YGFFGD856KPSGZN1N8ZKZR0",
+            
debit_account="payto://iban/BUKBGB22/DE00000000000000000000?sender-name=TheName"
         ),
         auth=PERSONA.nexus.auth
     ))
 
+    assertResponse(post(
+        
f"{PERSONA.nexus.base_url}/bank-accounts/{PERSONA.nexus.bank_label}/fetch-transactions",
+        auth=PERSONA.nexus.auth
+    ))
+
+    resp = assertResponse(get(
+        "/".join([
+            PERSONA.nexus.base_url,
+            "facades",
+            PERSONA.nexus.taler_facade_name,
+            "taler/history/incoming?delta=5"]),
+        auth=PERSONA.nexus.auth
+    ))
+    print(resp.json().get("incoming_transactions"))
+    assert len(resp.json().get("incoming_transactions")) == 1
+
 def test_taler_facade_outgoing(make_taler_facade):
     assertResponse(
         post(
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
index ed201e8..7f07be3 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
@@ -332,6 +332,7 @@ private suspend fun talerAddIncoming(call: ApplicationCall, 
httpClient: HttpClie
                 "debitorName": "${debtor.name}",
                 "amount": "${parsedAmount.amount}",
                 "currency": "${parsedAmount.currency}",
+                "direction": "CRDT",
                 "subject": "${addIncomingData.reserve_pub}"
             }""".trimIndent()
             contentType(ContentType.Application.Json)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]