{
struct GNUNET_GETOPT_CommandLineOption options[] = {
-
+
GNUNET_GETOPT_option_string ('k',
"key",
"KEY",
gettext_noop ("the query key"),
&query_key),
-
+
GNUNET_GETOPT_option_uint ('r',
- "replication",
- "LEVEL",
- gettext_noop ("how many parallel requests (replicas) to create"),
- &replication),
-
-
+ "replication",
+ "LEVEL",
+ gettext_noop ("how many parallel requests (replicas) to create"),
+ &replication),
GNUNET_GETOPT_option_uint ('t',
- "type",
- "TYPE",
- gettext_noop ("the type of data to look for"),
- &query_type),
-
+ "type",
+ "TYPE",
+ gettext_noop ("the type of data to look for"),
+ &query_type),
GNUNET_GETOPT_option_relative_time ('T',
- "timeout",
- "TIMEOUT",
- gettext_noop ("how long to execute this query before giving up?"),
- &timeout_request),
-
+ "timeout",
+ "TIMEOUT",
+ gettext_noop ("how long to execute this query before giving up?"),
+ &timeout_request),
GNUNET_GETOPT_option_flag ('x',
- "demultiplex",
- gettext_noop ("use DHT's demultiplex everywhere option"),
- &demultixplex_everywhere),
-
+ "demultiplex",
+ gettext_noop ("use DHT's demultiplex everywhere option"),
+ &demultixplex_everywhere),
GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
--- /dev/null
+[dhtcache]
+QUOTA = 1 MB
+DATABASE = heap
+
+[transport]
+PLUGINS = tcp
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+NEIGHBOUR_LIMIT = 50
+PORT = 12365
+
+[ats]
+WAN_QUOTA_IN = 1 GB
+WAN_QUOTA_OUT = 1 GB
+
+[transport-tcp]
+TIMEOUT = 300 s
+BINDTO = 127.0.0.1
+
+[PATHS]
+GNUNET_TEST_HOME = /tmp/test-gnunet-dht-peer-1/
+
+[nat]
+DISABLEV6 = YES
+ENABLE_UPNP = NO
+BEHIND_NAT = NO
+ALLOW_NAT = NO
+INTERNAL_ADDRESS = 127.0.0.1
+EXTERNAL_ADDRESS = 127.0.0.1
+USE_LOCALADDR = NO
+
+[dht]
+AUTOSTART = YES
+FORCESTART = YES
+
+[nse]
+AUTOSTART = YES
+WORKBITS = 1
+# Configuration to disable autostarting of
+# all services above the 'core' level.
+# (including resolver)
+
+[dns]
+AUTOSTART = NO
+
+[cadet]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO
+
+[fs]
+AUTOSTART = NO
+
+[dv]
+AUTOSTART = NO
+
+[vpn]
+AUTOSTART = NO
+
+[consensus]
+AUTOSTART = NO
+
+[resolver]
+AUTOSTART = NO
+
+[namestore]
+AUTOSTART = NO
+
+[namecache]
+AUTOSTART = NO
+
+[identity]
+AUTOSTART = NO
+
+[revocation]
+AUTOSTART = NO
+
+[conversation]
+AUTOSTART = NO
+
+[peerstore]
+AUTOSTART = NO
+
+[psycstore]
+AUTOSTART = NO
+
+[gns]
+AUTOSTART = NO
+
+[regex]
+AUTOSTART = NO
+
+[set]
+AUTOSTART = NO
+
+[scalarproduct-bob]
+AUTOSTART = NO
+
+[scalarproduct-alice]
+AUTOSTART = NO
+
+[social]
+AUTOSTART = NO
+
+[psyc]
+AUTOSTART = NO
+
+[rps]
+AUTOSTART = NO
+
+[multicast]
+AUTOSTART = NO
+
+[sensordashboard]
+AUTOSTART = NO
+
+[sensor]
+AUTOSTART = NO
+# Configuration file that can be included to prevent ANY of the usual
+# FORCESTART = YES to be set. Also disables NSE POW calculation.
+#
+# This configuration is included from various configuration test files.
+# Whenever a new service is added that has FORCESTART = YES for
+# production should be disabled for (most) test suites, the option should
+# be added here instead of all over the place ;-).
+
+[core]
+FORCESTART = NO
+
+[fs]
+FORCESTART = NO
+
+[dht]
+FORCESTART = NO
+
+[cadet]
+FORCESTART = NO
+
+[nse]
+FORCESTART = NO
+WORKBITS = 0
+
+[revocation]
+FORCESTART = NO
+
+[topology]
+FORCESTART = NO
+
+[hostlist]
+FORCESTART = NO
+
+[gns]
+FORCESTART = NO
+
+[zonemaster]
+FORCESTART = NO
\ No newline at end of file
#!/bin/sh
+# This file is in the public domain.
out=`mktemp /tmp/test-gnunet-dht-logXXXXXXXX`
-tempcfg=`mktemp /tmp/test_dht_api_peer1.XXXXXXXX`
+tempcfg=`mktemp /tmp/test-dht-tools.XXXXXXXX`
checkout="check.out"
armexe="gnunet-arm -c $tempcfg "
putexe="gnunet-dht-put -c $tempcfg "
rm -f $out $tempcfg
}
-cp test_dht_api_peer1.conf $tempcfg
-
-echo -n "TEST: Generating hostkey..."
-if ! $peerinfo > $out ; then
- echo "FAIL: error running $peerinfo"
- echo "Command output was:"
- cat $out
- exit 1
-fi
-echo "PASS"
+cp test_dht_tools.conf $tempcfg
echo -n "TEST: Starting ARM..."
if ! $armexe $DEBUG -s > $out ; then
exit 1
fi
echo "PASS"
-sleep 1
echo -n "TEST: Testing put..."
if ! $putexe -k testkey -d testdata -t 8 > $out ; then
exit 1
fi
echo "PASS"
-sleep 1
echo -n "TEST: Testing get..."
echo "Result 0, type 8:" > $checkout
echo "testdata" >> $checkout
-if ! $getexe -k testkey -T 5 -t 8 > $out ; then
+if ! $getexe -k testkey -T 100ms -t 8 > $out ; then
echo "FAIL: error running $putexe"
echo "Command output was:"
cat $out
fi
if ! diff --strip-trailing-cr -q $out $checkout ; then
- echo "FAIL: $out and $checkout differ"
+ echo "FAIL: $out and $checkout differ:"
+ diff --strip-trailing-cr $out $checkout
stop_arm
exit 1
fi