aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gnunet_gns.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gnunet_gns.sh')
-rwxr-xr-xsrc/gns/test_gnunet_gns.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gns/test_gnunet_gns.sh b/src/gns/test_gnunet_gns.sh
new file mode 100755
index 0000000..cd68027
--- /dev/null
+++ b/src/gns/test_gnunet_gns.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+ME=`whoami`
+if [ "$ME" != "root" ]
+then
+ echo "This test only works if run as root. Skipping."
+ exit 0
+fi
+export PATH=".:$PATH"
+gnunet-service-gns -c gns.conf &
+sleep 1
+LO=`nslookup alice.gnunet | grep Address | tail -n1`
+if [ "$LO" != "Address: 1.2.3.4" ]
+then
+ echo "Fail: $LO"
+fi
+LO=`nslookup www.bob.gnunet | grep Address | tail -n1`
+if [ "$LO" != "Address: 4.5.6.7" ]
+then
+ echo "Fail: $LO"
+fi
+kill `jobs -p`