Add admin port support with other major refactorations
Some checks failed
Continuous Integration / lint-and-security (pull_request) Failing after 39s
Continuous Integration / tests-and-coverage (pull_request) Successful in 24s

This commit is contained in:
2026-06-29 19:47:48 +02:00
parent df629b2922
commit aebd5f4ef5
22 changed files with 1746 additions and 67 deletions

12
tests/conftest.py Normal file
View File

@@ -0,0 +1,12 @@
import pytest
import os
@pytest.fixture(scope="session")
def server_config():
"""Provides server connection parameters from environment variables with defaults."""
return {
"host": os.getenv("OPENTTD_HOST", "127.0.0.1"),
"game_port": int(os.getenv("OPENTTD_GAME_PORT", "3979")),
"admin_port": int(os.getenv("OPENTTD_ADMIN_PORT", "3977")),
"password": os.getenv("OPENTTD_PASSWORD", "asd")
}