gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r31017 - gnunet/src/gns


From: gnunet
Subject: [GNUnet-SVN] r31017 - gnunet/src/gns
Date: Tue, 3 Dec 2013 17:03:07 +0100

Author: wachs
Date: 2013-12-03 17:03:07 +0100 (Tue, 03 Dec 2013)
New Revision: 31017

Modified:
   gnunet/src/gns/test_gns_nick_shorten.sh
Log:
modify test to test shortened delegations in shorten and master zone


Modified: gnunet/src/gns/test_gns_nick_shorten.sh
===================================================================
--- gnunet/src/gns/test_gns_nick_shorten.sh     2013-12-03 14:53:25 UTC (rev 
31016)
+++ gnunet/src/gns/test_gns_nick_shorten.sh     2013-12-03 16:03:07 UTC (rev 
31017)
@@ -54,40 +54,45 @@
 gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c 
test_gns_lookup.conf
 
 # Delete namecache content
-gnunet-arm -c test_gns_lookup.conf -k gns
+#gnunet-arm -c test_gns_lookup.conf -k gns
 gnunet-arm -c test_gns_lookup.conf -k namecache
 rm -rf `gnunet-config -c test_gns_lookup.conf -s namecache-sqlite -o FILENAME 
-f`
 
 # Force start of GNS
 gnunet-arm -c test_gns_lookup.conf -i gns
-
 # need to sleep here, to give PSEU record chance to be copied to DHT
 sleep 1
+
 RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_NAME -t A -c 
test_gns_lookup.conf`
 
 # need to sleep here, as shortening happens asynchronously...
 sleep 1
-RES_IP_PSEU=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.alice.short.gnu -t 
A -c test_gns_lookup.conf`
+
+# DO THAT 
+PKEY_SHORT_RES=$($DO_TIMEOUT gnunet-gns --raw -c test_gns_lookup.conf -z 
short-zone -u alice.gnu -t PKEY)
+echo "Resolving alice's PKEY in shorten zone: $PKEY_SHORT_RES"
+PKEY_RES=$($DO_TIMEOUT gnunet-gns --raw -c test_gns_lookup.conf -z testego -u 
alice.short.gnu -t PKEY)
+echo "Resolving alice's PKEY in master zone: $PKEY_RES"
+
+#RES_IP_PSEU=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.alice.short.gnu 
-t A -c test_gns_lookup.conf`
+
 gnunet-namestore -z testego -d -n mybestfriendalice -t PKEY -V $DELEGATED_PKEY 
 -e never -c test_gns_lookup.conf
-
 gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP  -e never -c 
test_gns_lookup.conf
 gnunet-arm -e -c test_gns_lookup.conf
 
 rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
 
-if [ "$RES_IP" == "$TEST_IP" ]
+if [ "$DELEGATED_PKEY" == "$PKEY_SHORT_RES" ]
 then
-  echo "PASS: Resolved $TEST_NAME properly to $RES_IP."
+  echo "PASS: Resolved delegation for shorten name in shortened zone"
 else
-  echo "FAIL: Could not resolve $TEST_NAME to proper IP, got $RES_IP."
-  exit 1
+  echo "FAIL: Expected PKEY in $DELEGATED_PKEY, received PKEY 
'$PKEY_SHORT_RES' in shorten zone."
 fi
 
-if [ "$RES_IP_PSEU" == "$TEST_IP" ]
+if [ "$DELEGATED_PKEY" == "$PKEY_RES" ]
 then
-  echo "PASS: Resolved $TEST_NAME_SHORT properly to $RES_IP."
+  echo "PASS: Resolved delegation for shorten name in master zone"
   exit 0
 else
-  echo "FAIL: Could not resolve $TEST_NAME_SHORT to proper IP, got 
$RES_IP_PSEU."
-  exit 1
-fi  
\ No newline at end of file
+  echo "FAIL: Expected PKEY in $DELEGATED_PKEY, received PKEY $PKEY_SHORT_RES 
in master zone."
+fi  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]