[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 01/02: fix rest testcase
From: |
gnunet |
Subject: |
[gnunet] 01/02: fix rest testcase |
Date: |
Thu, 12 Dec 2019 17:15:34 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit b02f87bb1c651d42e0477f9459d6919cad294d8c
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Dec 12 17:12:21 2019 +0100
fix rest testcase
---
src/gns/test_plugin_rest_gns.sh | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/gns/test_plugin_rest_gns.sh b/src/gns/test_plugin_rest_gns.sh
index 4079b8bad..1412f8753 100755
--- a/src/gns/test_plugin_rest_gns.sh
+++ b/src/gns/test_plugin_rest_gns.sh
@@ -1,7 +1,6 @@
#!/bin/sh
# This file is in the public domain.
-trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
-
+trap "gnunet-arm -e -c test_gns_lookup.conf" INT
LOCATION=$(which gnunet-config)
if [ -z $LOCATION ]
then
@@ -22,13 +21,16 @@ wrong_link="http://localhost:7776/gnsandmore"
curl_get () {
#$1 is link
#$2 is grep
- cache="$(gnurl -v "$1" 2>&1 | grep "$2")"
+ XURL=`which gnurl || which curl`
+ echo "Using $XURL to download $1"
+ cache="$(${XURL} -v "$1" 2>&1 | grep "$2")"
#echo "$cache"
if [ "" = "$cache" ]
then
gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1
gnunet-arm -e -c test_gns_lookup.conf
- exit 1
+ echo "HTTP client (curl/gnurl) not found, exiting"
+ exit 77
fi
}
TEST_TLD="testtld"
@@ -64,5 +66,5 @@ gnunet-namestore -z "$TEST_TLD" -d -n www -c
test_gns_lookup.conf
gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1
curl_get "$gns_link/www1.$TEST_TLD" "error"
-gnunet-arm -e -c -c test_gns_lookup.conf
+gnunet-arm -e -c test_gns_lookup.conf
exit 0
--
To stop receiving notification emails like this one, please contact
address@hidden.