diff options
Diffstat (limited to 'src/peerinfo-tool/test_gnunet_peerinfo.py')
-rwxr-xr-x | src/peerinfo-tool/test_gnunet_peerinfo.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/peerinfo-tool/test_gnunet_peerinfo.py b/src/peerinfo-tool/test_gnunet_peerinfo.py index 3aa8497af..e9881a7b6 100755 --- a/src/peerinfo-tool/test_gnunet_peerinfo.py +++ b/src/peerinfo-tool/test_gnunet_peerinfo.py | |||
@@ -38,6 +38,11 @@ try: | |||
38 | pinfo.expect (re.compile (".......................................................................................................\r")); | 38 | pinfo.expect (re.compile (".......................................................................................................\r")); |
39 | pinfo.expect (pexpect.EOF); | 39 | pinfo.expect (pexpect.EOF); |
40 | 40 | ||
41 | pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf invalid') | ||
42 | pinfo.expect (re.compile ("Invalid command line argument `invalid\'\r")); | ||
43 | pinfo.expect (pexpect.EOF); | ||
44 | |||
45 | |||
41 | os.system ('gnunet-arm -q -i transport -c test_gnunet_peerinfo_data.conf') | 46 | os.system ('gnunet-arm -q -i transport -c test_gnunet_peerinfo_data.conf') |
42 | 47 | ||
43 | pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf') | 48 | pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf') |
@@ -50,6 +55,17 @@ try: | |||
50 | pinfo.expect (re.compile (" *127.0.0.1:24357\r")); | 55 | pinfo.expect (re.compile (" *127.0.0.1:24357\r")); |
51 | pinfo.expect (pexpect.EOF); | 56 | pinfo.expect (pexpect.EOF); |
52 | 57 | ||
58 | pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf -qs') | ||
59 | pid = pinfo.read (-1) | ||
60 | pid = pid.strip () | ||
61 | |||
62 | pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf 4 ' + pid) | ||
63 | pinfo.expect (re.compile ("Peer `" + pid + "\' with trust *4\r")); | ||
64 | pinfo.expect (pexpect.EOF); | ||
65 | |||
66 | pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf -- -4 ' + pid) | ||
67 | pinfo.expect (re.compile ("Peer `" + pid + "\' with trust *0\r")); | ||
68 | pinfo.expect (pexpect.EOF); | ||
53 | 69 | ||
54 | finally: | 70 | finally: |
55 | os.system ('gnunet-arm -c test_gnunet_peerinfo_data.conf -eq') | 71 | os.system ('gnunet-arm -c test_gnunet_peerinfo_data.conf -eq') |