aboutsummaryrefslogtreecommitdiff
path: root/src/dht/test_dht_tools.py.in
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-26 15:06:28 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-26 15:06:28 +0100
commit3ba5a176f9fec927fbb8b60c24dd333e783df18f (patch)
treecf9c0808f129c45f8e0c97029bcad5c3c35530db /src/dht/test_dht_tools.py.in
parenta2b98912a9e67a450caa7493162c2af69a6d1e18 (diff)
downloadgnunet-3ba5a176f9fec927fbb8b60c24dd333e783df18f.tar.gz
gnunet-3ba5a176f9fec927fbb8b60c24dd333e783df18f.zip
document what test does
Diffstat (limited to 'src/dht/test_dht_tools.py.in')
-rw-r--r--src/dht/test_dht_tools.py.in14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/dht/test_dht_tools.py.in b/src/dht/test_dht_tools.py.in
index 0f48d7f76..9489d12c1 100644
--- a/src/dht/test_dht_tools.py.in
+++ b/src/dht/test_dht_tools.py.in
@@ -1,4 +1,16 @@
1#!@PYTHON@ 1#!@PYTHON@
2#
3# This testcase simply checks that the DHT command-line tools work.
4# It launches a single peer, stores a value "testdata" under "testkey",
5# and then gives the system 50 ms to fetch it.
6#
7# This could fail if
8# - command line tool interfaces fail
9# - DHT plugins for storage are not installed / working
10# - block plugins for verification (the test plugin) is not installed
11#
12# The code does NOT depend on DHT routing or any actual P2P functionality.
13#
2from __future__ import print_function 14from __future__ import print_function
3import os 15import os
4import sys 16import sys
@@ -103,7 +115,7 @@ print ("PASS")
103time.sleep (1) 115time.sleep (1)
104 116
105print ("TEST: Testing get...", end='') 117print ("TEST: Testing get...", end='')
106rc, stdo, stde = r_get (['-k', 'testkey', '-T', '5 ms', '-t', '8'], want_stdo = True, failer = end_arm_failer) 118rc, stdo, stde = r_get (['-k', 'testkey', '-T', '50 ms', '-t', '8'], want_stdo = True, failer = end_arm_failer)
107stdo = stdo.replace ('\r', '').splitlines () 119stdo = stdo.replace ('\r', '').splitlines ()
108expect = "Result 0, type 8:\ntestdata".splitlines() 120expect = "Result 0, type 8:\ntestdata".splitlines()
109if len (stdo) != 2 or len (expect) != 2 or stdo[0] != expect[0] or stdo[1] != expect[1]: 121if len (stdo) != 2 or len (expect) != 2 or stdo[0] != expect[0] or stdo[1] != expect[1]: