mirror of
https://github.com/logos-messaging/logos-delivery-interop-tests.git
synced 2026-05-06 07:39:27 +00:00
* Add logos-delivery-python-bindings submodule * Adding wrapper manager modifications * Add unit test for wrappers * ignore third paty * Ignore third party * Add thin wrapper layer to be used in tests * Add last API * Add needed helpers * basic tests added * Fix minor points * Add dependency to the requirements * Fix the yml file * add debug info * Add logos-delivery submodule * Add logos-delivery-python-bindings submodule * Remove old logos-delivery submodule * fix the import path issue * add cffi * add .so build step * add nim * remove nimble * fix the nimble error * Add rest of libraries * Fix the nim version issue * Add nimble install command * Make real setup for the nimple * change nim version * Ignore vendor files * fix for review points * remove stubs file * merge master & add comment about wrapper_manager usage
35 lines
800 B
Python
35 lines
800 B
Python
import socket
|
|
import pytest
|
|
from src.test_data import DEFAULT_CLUSTER_ID
|
|
|
|
|
|
def _free_port():
|
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
|
s.bind(("", 0))
|
|
return s.getsockname()[1]
|
|
|
|
|
|
def build_node_config(**overrides):
|
|
config = {
|
|
"logLevel": "DEBUG",
|
|
"listenAddress": "0.0.0.0",
|
|
"tcpPort": _free_port(),
|
|
"discv5UdpPort": _free_port(),
|
|
"restPort": _free_port(),
|
|
"restAddress": "0.0.0.0",
|
|
"clusterId": DEFAULT_CLUSTER_ID,
|
|
"relay": True,
|
|
"store": True,
|
|
"filter": False,
|
|
"lightpush": False,
|
|
"peerExchange": False,
|
|
"discv5Discovery": False,
|
|
}
|
|
config.update(overrides)
|
|
return config
|
|
|
|
|
|
@pytest.fixture
|
|
def node_config():
|
|
return build_node_config()
|