gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: import JSON minimal check library


From: gnunet
Subject: [libeufin] branch master updated: import JSON minimal check library
Date: Thu, 03 Sep 2020 11:41:58 +0200

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 a6375e5  import JSON minimal check library
a6375e5 is described below

commit a6375e5da848323ad0b04d608b0b124c282ea4e1
Author: MS <ms@taler.net>
AuthorDate: Thu Sep 3 11:41:42 2020 +0200

    import JSON minimal check library
---
 integration-tests/all.sh  |  2 ++
 integration-tests/util.py | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/integration-tests/all.sh b/integration-tests/all.sh
index d4911cd..6bbb7ae 100755
--- a/integration-tests/all.sh
+++ b/integration-tests/all.sh
@@ -1,5 +1,7 @@
 #!/usr/bin/bash
 
+set -e
+
 ./test-ebics-backup.py
 ./test-ebics-highlevel.py
 ./test-ebics.py
diff --git a/integration-tests/util.py b/integration-tests/util.py
index ab38ea5..fa933e6 100644
--- a/integration-tests/util.py
+++ b/integration-tests/util.py
@@ -8,6 +8,25 @@ import atexit
 from pathlib import Path
 import sys
 
+class CheckJsonField:
+    def __init__(self, name, nested = []):
+        self.name = name
+        self.nested = nested
+
+    def check(self, json):
+        if self.name not in json:
+            print(f"'{self.name}' not found in the JSON.")
+            sys.exit(1)
+        for nested_check in self.nested:
+            self.nested_check.check(json.get(self.name))
+
+class CheckJsonTop:
+    def __init__(self, *args):
+        self.checks = args
+
+    def check(self, json):
+        for check in self.checks:
+            check.check(json)
 
 def checkPort(port):
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

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