#!@PYTHON@
+#
+# This testcase simply checks that the DHT command-line tools work.
+# It launches a single peer, stores a value "testdata" under "testkey",
+# and then gives the system 50 ms to fetch it.
+#
+# This could fail if
+# - command line tool interfaces fail
+# - DHT plugins for storage are not installed / working
+# - block plugins for verification (the test plugin) is not installed
+#
+# The code does NOT depend on DHT routing or any actual P2P functionality.
+#
from __future__ import print_function
import os
import sys
import time
import tempfile
+os.environ["PATH"] = "@bindir@" + ":" + os.environ["PATH"];
+
if os.name == "nt":
tmp = os.getenv ("TEMP")
else:
time.sleep (1)
print ("TEST: Testing get...", end='')
-rc, stdo, stde = r_get (['-k', 'testkey', '-T', '5 ms', '-t', '8'], want_stdo = True, failer = end_arm_failer)
+rc, stdo, stde = r_get (['-k', 'testkey', '-T', '50 ms', '-t', '8'], want_stdo = True, failer = end_arm_failer)
stdo = stdo.replace ('\r', '').splitlines ()
expect = "Result 0, type 8:\ntestdata".splitlines()
if len (stdo) != 2 or len (expect) != 2 or stdo[0] != expect[0] or stdo[1] != expect[1]: