3 out=`mktemp /tmp/test-gnunet-arm-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:"
20 cp test_dht_api_peer1.conf $tempcfg
22 echo -n "TEST: Generating hostkey..."
23 if ! $peerinfo > $out ; then
24 echo "FAIL: error running $peerinfo"
25 echo "Command output was:"
30 echo -n "TEST: Starting ARM..."
31 if ! $armexe $DEBUG -s > $out ; then
32 echo "FAIL: error running $armexe"
33 echo "Command output was:"
41 echo -n "TEST: Testing put..."
42 if ! $putexe -k testkey -d testdata > $out ; then
43 echo "FAIL: error running $putexe"
44 echo "Command output was:"
52 echo -n "TEST: Testing get..."
53 echo "Result 0, type 0:" > $checkout
54 echo "testdata" >> $checkout
56 if ! $getexe -k testkey -T 1 > $out ; then
57 echo "FAIL: error running $putexe"
58 echo "Command output was:"
63 if ! diff -q $out $checkout ; then
64 echo "FAIL: $out and $checkout differ"