mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 00:51:12 +00:00
tests-functional/ -> test/functional/ tests-unit-network/ -> test/unit-network/ No Go code changes beyond the two package paths. Every reference follows: Makefile targets, the pytest-lint and reliability workflows, the three Jenkinsfiles, the root Dockerfile, pyrightconfig.json, .gitignore, the benchmark and functional-test scripts, and the docs. All paths inside the moved directories are self-contained (docker compose uses `context: .`, the Python helpers resolve from __file__), so the extra level of nesting does not reach outside. refs #7067
36 lines
1.4 KiB
Python
36 lines
1.4 KiB
Python
import logging
|
|
|
|
import pytest
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
@pytest.mark.rpc
|
|
class TestNodeConfig:
|
|
|
|
@pytest.fixture()
|
|
def config(self, backend_new_profile):
|
|
return backend_new_profile("settings-backend")
|
|
|
|
def test_verify_node_config_stability(self, config):
|
|
cfg1 = config.settings_service.get_node_config()
|
|
cfg2 = config.settings_service.get_node_config()
|
|
assert cfg1 == cfg2, "NodeConfig should be stable across calls"
|
|
|
|
def test_check_node_config_params(self, config):
|
|
cfg = config.settings_service.get_node_config()
|
|
boot_api = config.get_boot_api_config()
|
|
assert cfg["WSEnabled"] == boot_api["wsEnabled"]
|
|
assert cfg["WSHost"] == boot_api["wsHost"]
|
|
assert cfg["WSPort"] == boot_api["wsPort"]
|
|
assert cfg["HTTPEnabled"] == boot_api["httpEnabled"]
|
|
assert cfg["HTTPPort"] == boot_api["httpPort"]
|
|
|
|
def test_verify_node_config_enforce(self, backend_new_profile):
|
|
forced_network_id = 4242
|
|
backend = backend_new_profile("forced_network", network_id=forced_network_id)
|
|
cfg = backend.settings_service.get_node_config()
|
|
network_id = cfg["NetworkId"]
|
|
assert network_id is not None, f"NetworkId key missing in node config: {cfg}"
|
|
assert int(network_id) == forced_network_id, f"Expected NetworkId={forced_network_id}, got {network_id}"
|