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 "
12 if ! $armexe $DEBUG -e -d > $out ; then
13 echo "FAIL: error running $armexe"
14 echo "Command output was:"
21 cp test_dht_api_peer1.conf $tempcfg
23 echo -n "TEST: Starting ARM..."
24 if ! $armexe $DEBUG -s > $out ; then
25 echo "FAIL: error running $armexe"
26 echo "Command output was:"
34 echo -n "TEST: Testing put..."
35 if ! $putexe -k testkey -d testdata > $out ; then
36 echo "FAIL: error running $putexe"
37 echo "Command output was:"
45 echo -n "TEST: Testing get..."
46 echo "Result 0, type 0:" > $checkout
47 echo "testdata" >> $checkout
49 if ! $getexe -k testkey -T 1 > $out ; then
50 echo "FAIL: error running $putexe"
51 echo "Command output was:"
56 if ! diff -q $out $checkout ; then
57 echo "FAIL: $out and $checkout differ"