import re
pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf')
-pinfo.expect ('Timeout trying to interact with PEERINFO service\r')
+pinfo.expect ('Error in communication with PEERINFO service\r')
pinfo.expect (pexpect.EOF);
os.system ('rm -rf /tmp/gnunet-test-peerinfo/')
os.system ('gnunet-arm -sq -c test_gnunet_peerinfo_data.conf')
os.system ('gnunet-arm -q -i transport -c test_gnunet_peerinfo_data.conf')
os.system ('sleep 1')
pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf')
- pinfo.expect (re.compile ("Peer `.*\' with trust *0\r"));
- pinfo.expect (re.compile (" *localhost:24357\r"));
+ pinfo.expect (re.compile ("Peer `.*\'\r"));
+ pinfo.expect (re.compile (" *:24357\r"));
pinfo.expect (pexpect.EOF);
pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf -n')
- pinfo.expect (re.compile ("Peer `.*\' with trust *0\r"));
- pinfo.expect (re.compile (" *127..*:24357\r"));
+ pinfo.expect (re.compile ("Peer `.*\'\r"));
+ pinfo.expect (re.compile (" *:24357\r"));
pinfo.expect (pexpect.EOF);
pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf -qs')
pid = pinfo.read (-1)
pid = pid.strip ()
- pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf 4 ' + pid)
- pinfo.expect (re.compile ("Peer `" + pid + "\' with trust *4\r"));
- pinfo.expect (pexpect.EOF);
-
- pinfo = pexpect.spawn ('gnunet-peerinfo -c test_gnunet_peerinfo_data.conf -- -4 ' + pid)
- pinfo.expect (re.compile ("Peer `" + pid + "\' with trust *0\r"));
- pinfo.expect (pexpect.EOF);
-
finally:
os.system ('gnunet-arm -c test_gnunet_peerinfo_data.conf -eq')
os.system ('rm -rf /tmp/gnunet-test-peerinfo/')