2 CONFIGURATION="test_namestore_api.conf"
3 trap "gnunet-arm -e -c $CONFIGURATION" SIGINT
5 LOCATION=$(which gnunet-config)
8 LOCATION="gnunet-config"
10 $LOCATION --version 1> /dev/null
13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
17 rm -rf `$LOCATION -c $CONFIGURATION -s PATHS -o GNUNET_HOME`
18 TEST_DOMAIN_PLUS="www.gnu"
19 TEST_DOMAIN_DNS="www3.gnu"
20 TEST_IP_PLUS="127.0.0.1"
21 TEST_IP_DNS="131.159.74.67"
22 TEST_RECORD_CNAME_SERVER="server"
23 TEST_RECORD_CNAME_PLUS="server.+"
24 TEST_RECORD_CNAME_DNS="gnunet.org"
25 TEST_RECORD_NAME_SERVER="server"
26 TEST_RECORD_NAME_PLUS="www"
27 TEST_RECORD_NAME_DNS="www3"
28 which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
32 gnunet-arm -s -c $CONFIGURATION
33 gnunet-identity -C testego -c $CONFIGURATION
38 gnunet-identity -D testego -c $CONFIGURATION
39 gnunet-arm -e -c $CONFIGURATION
44 # Create a public record
45 gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t A -V $TEST_IP_PLUS -e never -c $CONFIGURATION
49 if [ $NAMESTORE_RES == 0 ]
51 echo "PASS: Creating name in namestore"
53 echo "FAIL: Creating name in namestore failed with $NAMESTORE_RES."