test: make sonic takeover fixtures explicit

This commit is contained in:
Nick Sweeting 2026-06-07 06:07:44 -07:00
parent bb436c5b8d
commit 0816435b68
No known key found for this signature in database
2 changed files with 9 additions and 3 deletions

View File

@ -489,11 +489,14 @@ def archivebox_daemon_server(initialized_archive, free_tcp_port_factory):
started: list[tuple[Path, dict[str, str]]] = []
def start(**env_overrides: str):
env_config = {
"SEARCH_BACKEND_SONIC_HOST_NAME": "127.0.0.1",
"SEARCH_BACKEND_SONIC_PORT": str(free_tcp_port_factory()),
**{key: str(value) for key, value in env_overrides.items()},
}
env = cli_env(
live=True,
SEARCH_BACKEND_SONIC_HOST_NAME="127.0.0.1",
SEARCH_BACKEND_SONIC_PORT=str(free_tcp_port_factory()),
**{key: str(value) for key, value in env_overrides.items()},
**env_config,
)
port = free_tcp_port_factory()
result = run_archivebox_cmd(

View File

@ -118,6 +118,7 @@ def test_behavior_update_yields_to_server_then_finishes_visible_indexing(tmp_pat
env = cli_env(
live=True,
PLUGINS="wget,parse_html_urls,search_backend_sqlite",
SEARCH_BACKEND_ENGINE="sqlite",
SEARCH_BACKEND_SONIC_PORT=str(get_free_port()),
)
@ -344,6 +345,7 @@ def test_live_server_keeps_http_runtime_while_update_runs_real_sqlite_indexer(tm
env = cli_env(
live=True,
PLUGINS="wget,parse_html_urls,search_backend_sqlite",
SEARCH_BACKEND_ENGINE="sqlite",
SEARCH_BACKEND_SONIC_PORT=str(get_free_port()),
)
@ -433,6 +435,7 @@ def test_live_update_yields_to_server_then_reclaims_real_sqlite_indexing(tmp_pat
env = cli_env(
live=True,
PLUGINS="wget,parse_html_urls,search_backend_sqlite",
SEARCH_BACKEND_ENGINE="sqlite",
SEARCH_BACKEND_SONIC_PORT=str(get_free_port()),
)