gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 01/02: Integration tests.


From: gnunet
Subject: [libeufin] 01/02: Integration tests.
Date: Fri, 13 Nov 2020 18:52:34 +0100

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

ms pushed a commit to branch master
in repository libeufin.

commit b4702b9ab671217cd2d463b599dd562767a20ba1
Author: MS <ms@taler.net>
AuthorDate: Fri Nov 13 18:49:18 2020 +0100

    Integration tests.
    
    Defining unique test file.
---
 integration-tests/test.py | 64 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/integration-tests/test.py b/integration-tests/test.py
new file mode 100755
index 0000000..cd77b44
--- /dev/null
+++ b/integration-tests/test.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python3
+
+from util import startNexus, startSandbox, assertResponse, flushTablesSandbox
+from requests import post, get
+
+# Databases
+NEXUS_DB="/tmp/test-nexus.sqlite3"
+SANDBOX_DB="/tmp/test-sandbox.sqlite3"
+
+# Nexus user details
+NEXUS_USERNAME = "person"
+NEXUS_PASSWORD = "y"
+
+# EBICS details
+EBICS_URL = "http://localhost:5000/ebicsweb";
+EBICS_HOST = "HOST01"
+EBICS_PARTNER = "PARTNER1"
+EBICS_USER = "USER1"
+EBICS_VERSION = "H004"
+
+# Subscriber's bank account at the Sandbox
+BANK_IBAN = "GB33BUKB20201555555555"
+BANK_BIC = "BUKBGB22"
+BANK_NAME = "Oliver Smith"
+BANK_LABEL = "savings"
+
+def prepareSandbox():
+    # make ebics host at sandbox
+    assertResponse(
+        post(
+            "http://localhost:5000/admin/ebics/host";,
+            json=dict(hostID=EBICS_HOST, ebicsVersion=EBICS_VERSION),
+        )
+    )
+    
+    # make new ebics subscriber at sandbox
+    assertResponse(
+        post(
+            "http://localhost:5000/admin/ebics/subscribers";,
+            json=dict(hostID=EBICS_HOST, partnerID=EBICS_PARTNER, 
userID=EBICS_USER),
+        )
+    )
+    
+    # give a bank account to such subscriber, at sandbox
+    assertResponse(
+        post(
+            "http://localhost:5000/admin/ebics/bank-accounts";,
+            json=dict(
+                subscriber=dict(hostID=EBICS_HOST, partnerID=EBICS_PARTNER, 
userID=EBICS_USER),
+                iban=BANK_IBAN,
+                bic=BANK_BIC,
+                name=BANK_NAME,
+                label=BANK_LABEL
+            )
+        )
+    )
+
+startNexus(NEXUS_DB)
+startSandbox(SANDBOX_DB)
+
+prepareSandbox()
+print("Services correctly started.")
+print("Emptying tables at Sandbox")
+flushTablesSandbox(SANDBOX_DB)

-- 
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]