aboutsummaryrefslogtreecommitdiff
path: root/src/cli/namestore/test_namestore_zonefile_import.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/namestore/test_namestore_zonefile_import.sh')
-rwxr-xr-xsrc/cli/namestore/test_namestore_zonefile_import.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cli/namestore/test_namestore_zonefile_import.sh b/src/cli/namestore/test_namestore_zonefile_import.sh
new file mode 100755
index 000000000..d6345257f
--- /dev/null
+++ b/src/cli/namestore/test_namestore_zonefile_import.sh
@@ -0,0 +1,33 @@
1#!/bin/sh
2# This file is in the public domain.
3trap "gnunet-arm -e -c test_namestore_api.conf" INT
4
5LOCATION=$(which gnunet-config)
6if [ -z $LOCATION ]
7then
8 LOCATION="gnunet-config"
9fi
10$LOCATION --version 1> /dev/null
11if test $? != 0
12then
13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
14 exit 77
15fi
16
17rm -rf `gnunet-config -c test_namestore_api.conf -f -s paths -o GNUNET_TEST_HOME`
18which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
19
20MY_EGO="myego"
21gnunet-arm -s -c test_namestore_api.conf
22gnunet-identity -C $MY_EGO -c test_namestore_api.conf
23gnunet-namestore-zonefile -c test_namestore_api.conf < example_zonefile
24res=$?
25gnunet-identity -D $MY_EGO -c test_namestore_api.conf
26gnunet-arm -e -c test_namestore_api.conf
27
28if [ $res != 0 ]; then
29 echo "FAIL: Zone import failed."
30 exit 1
31fi
32
33