Try to test with i2pd:
- TestProcessI2P runs minode with i2p args with _connection_limit = 4 - TestProcess waits for connections _wait_time sec (120 for TestProcessI2P)
This commit is contained in:
parent
1d82774c96
commit
7113916347
|
@ -1,6 +1,7 @@
|
||||||
"""Blind tests, starting the minode process"""
|
"""Blind tests, starting the minode process"""
|
||||||
import unittest
|
import unittest
|
||||||
import signal
|
import signal
|
||||||
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -8,6 +9,12 @@ import time
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
|
try:
|
||||||
|
socket.socket().bind(('127.0.0.1', 7656))
|
||||||
|
i2p_port_free = True
|
||||||
|
except (OSError, socket.error):
|
||||||
|
i2p_port_free = False
|
||||||
|
|
||||||
|
|
||||||
class TestProcessProto(unittest.TestCase):
|
class TestProcessProto(unittest.TestCase):
|
||||||
"""Test process attributes, common flow"""
|
"""Test process attributes, common flow"""
|
||||||
|
@ -113,3 +120,13 @@ class TestProcess(TestProcessProto):
|
||||||
else:
|
else:
|
||||||
if self._listen:
|
if self._listen:
|
||||||
self.fail('No listening connection found')
|
self.fail('No listening connection found')
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(i2p_port_free, 'No running i2pd detected')
|
||||||
|
class TestProcessI2P(TestProcess):
|
||||||
|
"""Test minode process with --i2p and no IP"""
|
||||||
|
_process_cmd = ['minode', '--i2p', '--no-ip']
|
||||||
|
_connection_limit = 4
|
||||||
|
_wait_time = 120
|
||||||
|
_listen = True
|
||||||
|
_listening_port = 8448
|
||||||
|
|
Loading…
Reference in New Issue
Block a user