[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 146/171: -add tests
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 146/171: -add tests |
Date: |
Thu, 04 Jan 2018 16:10:54 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 0af3570c12b847c2f38334c1f27ad198011d718b
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Tue Oct 10 21:15:56 2017 +0200
-add tests
---
src/identity-provider/Makefile.am | 16 ++++++++++++++++
src/identity-provider/test_idp.conf | 7 ++-----
src/identity-provider/test_idp_attribute.sh | 9 +++++++--
src/identity-provider/test_idp_consume.sh | 13 +++++++++----
src/identity-provider/test_idp_issue.sh | 12 ++++++++----
5 files changed, 42 insertions(+), 15 deletions(-)
diff --git a/src/identity-provider/Makefile.am
b/src/identity-provider/Makefile.am
index 098313f9a..a4b3f565d 100644
--- a/src/identity-provider/Makefile.am
+++ b/src/identity-provider/Makefile.am
@@ -16,6 +16,11 @@ if HAVE_SQLITE
SQLITE_PLUGIN = libgnunet_plugin_identity_provider_sqlite.la
endif
+EXTRA_DIST = \
+ test_idp_defaults.conf \
+ test_idp.conf \
+ $(check_SCRIPTS)
+
pkgcfgdir= $(pkgdatadir)/config.d/
libexecdir= $(pkglibdir)/libexec/
@@ -104,3 +109,14 @@ gnunet_idp_LDADD = \
$(top_builddir)/src/identity-provider/libgnunetidentityprovider.la \
$(top_builddir)/src/identity/libgnunetidentity.la \
$(GN_LIBINTL)
+
+check_SCRIPTS = \
+ test_idp_attribute.sh \
+ test_idp_issue.sh \
+ test_idp_consume.sh \
+ test_idp_revoke.sh
+
+if ENABLE_TEST_RUN
+ AM_TESTS_ENVIRONMENT=export
GNUNET_PREFIX=$${GNUNET_PREFIX:address@hidden@};export
PATH=$${GNUNET_PREFIX:address@hidden@}/bin:$$PATH;unset XDG_DATA_HOME;unset
XDG_CONFIG_HOME;
+ TESTS = $(check_SCRIPTS)
+endif
diff --git a/src/identity-provider/test_idp.conf
b/src/identity-provider/test_idp.conf
index e5d1c7186..2b76c7bf2 100644
--- a/src/identity-provider/test_idp.conf
+++ b/src/identity-provider/test_idp.conf
@@ -8,14 +8,14 @@ AUTOSTART = YES
[rest]
AUTOSTART = YES
-PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/restlog
+#PREFIX = valgrind --leak-check=full --track-origins=yes
--log-file=/tmp/restlog
[transport]
PLUGINS =
[identity-provider]
AUTOSTART = YES
-PREFIX = valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes
--log-file=/tmp/idplog
+#PREFIX = valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes
--log-file=/tmp/idplog
[gns]
#PREFIX = valgrind --leak-check=full --track-origins=yes
@@ -26,6 +26,3 @@ DEFAULT_LOOKUP_TIMEOUT = 15 s
RECORD_PUT_INTERVAL = 1 h
ZONE_PUBLISH_TIME_WINDOW = 1 h
DNS_ROOT=PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0
-
-[rest]
-PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/rest
diff --git a/src/identity-provider/test_idp_attribute.sh
b/src/identity-provider/test_idp_attribute.sh
index 7e86ae532..7f0f06dac 100755
--- a/src/identity-provider/test_idp_attribute.sh
+++ b/src/identity-provider/test_idp_attribute.sh
@@ -29,7 +29,12 @@ gnunet-identity -C testego -c test_idp.conf
gnunet-identity -C rpego -c test_idp.conf
TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep testego | awk '{print
$3}')
gnunet-idp -e testego -a email -V address@hidden -c test_idp.conf
-gnunet-idp -e testego -a name -V John -c test_idp.conf
-gnunet-idp -e testego -D -c test_idp.conf
+gnunet-idp -e testego -a name -V John -c test_idp.conf > /dev/null 2>&1
+if test $? != 0
+then
+ echo "Failed."
+ exit 1
+fi
+
#curl localhost:7776/idp/attributes/testego
gnunet-arm -e -c test_idp.conf
diff --git a/src/identity-provider/test_idp_consume.sh
b/src/identity-provider/test_idp_consume.sh
index e47c13da6..11f6865a4 100755
--- a/src/identity-provider/test_idp_consume.sh
+++ b/src/identity-provider/test_idp_consume.sh
@@ -24,7 +24,7 @@ which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
TEST_ATTR="test"
gnunet-arm -s -c test_idp.conf
-gnunet-arm -i rest -c test_idp.conf
+#gnunet-arm -i rest -c test_idp.conf
gnunet-identity -C testego -c test_idp.conf
gnunet-identity -C rpego -c test_idp.conf
SUBJECT_KEY=$(gnunet-identity -d -c test_idp.conf | grep rpego | awk '{print
$3}')
@@ -32,7 +32,12 @@ TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep
testego | awk '{print $3}'
gnunet-idp -e testego -a email -V address@hidden -c test_idp.conf
gnunet-idp -e testego -a name -V John -c test_idp.conf
TICKET=$(gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c
test_idp.conf | awk '{print $1}')
-echo "Consuming ticket $TICKET"
-gnunet-idp -e rpego -C $TICKET -c test_idp.conf
-curl http://localhost:7776/idp/tickets/testego
+gnunet-idp -e rpego -C $TICKET -c test_idp.conf > /dev/null 2>&1
+
+if test $? != 0
+then
+ "Failed."
+ exit 1
+fi
+#curl http://localhost:7776/idp/tickets/testego
gnunet-arm -e -c test_idp.conf
diff --git a/src/identity-provider/test_idp_issue.sh
b/src/identity-provider/test_idp_issue.sh
index 26c490c76..90487ee73 100755
--- a/src/identity-provider/test_idp_issue.sh
+++ b/src/identity-provider/test_idp_issue.sh
@@ -24,7 +24,7 @@ which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
TEST_ATTR="test"
gnunet-arm -s -c test_idp.conf
-gnunet-arm -i rest -c test_idp.conf
+#gnunet-arm -i rest -c test_idp.conf
gnunet-identity -C testego -c test_idp.conf
gnunet-identity -C rpego -c test_idp.conf
SUBJECT_KEY=$(gnunet-identity -d -c test_idp.conf | grep rpego | awk '{print
$3}')
@@ -32,7 +32,11 @@ TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep
testego | awk '{print $3}'
gnunet-idp -e testego -a email -V address@hidden -c test_idp.conf > /dev/null
2>&1
gnunet-idp -e testego -a name -V John -c test_idp.conf > /dev/null 2>&1
#gnunet-idp -e testego -D -c test_idp.conf
-TICKET=$(gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c
test_idp.conf | awk '{print $1}')
+gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c test_idp.conf >
/dev/null 2>&1
+if test $? != 0
+then
+ echo "Failed."
+ exit 1
+fi
#curl http://localhost:7776/idp/attributes/testego
-echo "Ticket: $TICKET"
-#gnunet-arm -e -c test_idp.conf
+gnunet-arm -e -c test_idp.conf
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 161/171: -fix, (continued)
- [GNUnet-SVN] [gnunet] 161/171: -fix, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 162/171: -start jwt, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 118/171: -minor fixed, start consume, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 141/171: -add attribute store API, fixes, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 139/171: -add ticket listing for rest, bugfixes, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 147/171: -add consume rest api, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 167/171: -merge, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 145/171: -bugfixes, fix memleaks, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 143/171: -improve revocation handling, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 160/171: -fix makefile, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 146/171: -add tests,
gnunet <=
- [GNUnet-SVN] [gnunet] 158/171: -refactored, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 165/171: Merge remote-tracking branch 'origin/master' into identity_abe, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 170/171: -cleanup doc; fixes, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 151/171: -fix docker, gnunet, 2018/01/04