aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-12-12 17:12:21 +0100
committerChristian Grothoff <christian@grothoff.org>2019-12-12 17:12:21 +0100
commitb02f87bb1c651d42e0477f9459d6919cad294d8c (patch)
treeabf28c31af2df3f246a84b033319ab1e56128ba0 /src
parent569d3ef34792ed8abc40f3e0ba87db8cac28b76f (diff)
downloadgnunet-b02f87bb1c651d42e0477f9459d6919cad294d8c.tar.gz
gnunet-b02f87bb1c651d42e0477f9459d6919cad294d8c.zip
fix rest testcase
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gns/test_plugin_rest_gns.sh12
1 files 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 @@
1#!/bin/sh 1#!/bin/sh
2# This file is in the public domain. 2# This file is in the public domain.
3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 3trap "gnunet-arm -e -c test_gns_lookup.conf" INT
4
5LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
6if [ -z $LOCATION ] 5if [ -z $LOCATION ]
7then 6then
@@ -22,13 +21,16 @@ wrong_link="http://localhost:7776/gnsandmore"
22curl_get () { 21curl_get () {
23 #$1 is link 22 #$1 is link
24 #$2 is grep 23 #$2 is grep
25 cache="$(gnurl -v "$1" 2>&1 | grep "$2")" 24 XURL=`which gnurl || which curl`
25 echo "Using $XURL to download $1"
26 cache="$(${XURL} -v "$1" 2>&1 | grep "$2")"
26 #echo "$cache" 27 #echo "$cache"
27 if [ "" = "$cache" ] 28 if [ "" = "$cache" ]
28 then 29 then
29 gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 30 gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1
30 gnunet-arm -e -c test_gns_lookup.conf 31 gnunet-arm -e -c test_gns_lookup.conf
31 exit 1 32 echo "HTTP client (curl/gnurl) not found, exiting"
33 exit 77
32 fi 34 fi
33} 35}
34TEST_TLD="testtld" 36TEST_TLD="testtld"
@@ -64,5 +66,5 @@ gnunet-namestore -z "$TEST_TLD" -d -n www -c test_gns_lookup.conf
64gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 66gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1
65 67
66curl_get "$gns_link/www1.$TEST_TLD" "error" 68curl_get "$gns_link/www1.$TEST_TLD" "error"
67gnunet-arm -e -c -c test_gns_lookup.conf 69gnunet-arm -e -c test_gns_lookup.conf
68exit 0 70exit 0