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:
Dmitri Bogomolov 2021-03-11 19:37:23 +02:00 committed by Lee Miller
parent 1d82774c96
commit 7113916347
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -1,6 +1,7 @@
"""Blind tests, starting the minode process"""
import unittest
import signal
import socket
import subprocess
import sys
import tempfile
@ -8,6 +9,12 @@ import time
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):
"""Test process attributes, common flow"""
@ -113,3 +120,13 @@ class TestProcess(TestProcessProto):
else:
if self._listen:
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