[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Integration test.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Integration test. |
Date: |
Mon, 04 May 2020 14:50:52 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 9663e72 Integration test.
9663e72 is described below
commit 9663e72a9da81d1febf2710551bc047b719b245f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon May 4 14:50:26 2020 +0200
Integration test.
Programmatically start the services.
---
integration-tests/test-ebics.py | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/integration-tests/test-ebics.py b/integration-tests/test-ebics.py
index a0adfea..9f9b507 100755
--- a/integration-tests/test-ebics.py
+++ b/integration-tests/test-ebics.py
@@ -1,6 +1,9 @@
#!/usr/bin/env python3
from requests import post, get
+from subprocess import call, Popen, PIPE
+from time import sleep
+import os
# Steps implemented in this test.
#
@@ -26,7 +29,6 @@ from requests import post, get
# 6 Request history again, from Nexus to Bank.
# 7 Verify that previous payment shows up.
-
# Nexus user details
USERNAME="person"
@@ -43,6 +45,38 @@ SUBSCRIBER_BIC="BUKBGB22"
SUBSCRIBER_NAME="Oliver Smith"
BANK_ACCOUNT_LABEL="savings"
+#-1 Clean databases and start services.
+assert(0 == call(["rm", "-f", "../sandbox/libeufin-sandbox.sqlite3"]))
+assert(0 == call(["rm", "-f", "../nexus/libeufin-nexus.sqlite3"]))
+DEVNULL = open(os.devnull, "w")
+
+# Start nexus
+nexus = Popen(["../gradlew", "nexus:run"], stdout=PIPE, stderr=PIPE)
+for i in range(10):
+ try:
+ get("http://localhost:5001/")
+ except:
+ if i == 9:
+ stdout, stderr = nexus.communicate()
+ print("{}\n{}".format(stdout.decode(), stderr.decode()))
+ exit(77)
+ sleep(1)
+ continue
+ break
+
+sandbox = Popen(["../gradlew", "sandbox:run"], stdout=PIPE, stderr=PIPE)
+for i in range(10):
+ try:
+ get("http://localhost:5000/")
+ except:
+ if i == 9:
+ stdout, stderr = nexus.communicate()
+ print("{}\n{}".format(stdout.decode(), stderr.decode()))
+ exit(77)
+ sleep(1)
+ continue
+ break
+
#0.a
resp = post(
"http://localhost:5000/admin/ebics-host",
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [libeufin] branch master updated: Integration test.,
gnunet <=