3 out=`mktemp /tmp/test-gnunet-dht-logXXXXXXXX`
4 tempcfg=`mktemp /tmp/test_dht_api_peer1.XXXXXXXX`
6 armexe="gnunet-arm -c $tempcfg "
7 putexe="gnunet-dht-put -c $tempcfg "
8 getexe="gnunet-dht-get -c $tempcfg "
9 peerinfo="gnunet-peerinfo -c $tempcfg -sq"
12 if ! $armexe $DEBUG -e -d > $out ; then
13 echo "FAIL: error running $armexe"
14 echo "Command output was:"
22 cp test_dht_api_peer1.conf $tempcfg
24 echo -n "TEST: Generating hostkey..."
25 if ! $peerinfo > $out ; then
26 echo "FAIL: error running $peerinfo"
27 echo "Command output was:"
33 echo -n "TEST: Starting ARM..."
34 if ! $armexe $DEBUG -s > $out ; then
35 echo "FAIL: error running $armexe"
36 echo "Command output was:"
44 echo -n "TEST: Testing put..."
45 if ! $putexe -k testkey -d testdata -t 8 > $out ; then
46 echo "FAIL: error running $putexe"
47 echo "Command output was:"
55 echo -n "TEST: Testing get..."
56 echo "Result 0, type 8:" > $checkout
57 echo "testdata" >> $checkout
59 if ! $getexe -k testkey -T 5 -t 8 > $out ; then
60 echo "FAIL: error running $putexe"
61 echo "Command output was:"
67 if ! diff --strip-trailing-cr -q $out $checkout ; then
68 echo "FAIL: $out and $checkout differ"