From 0816435b6894faa8d043fff960fddb13ebb341dd Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 7 Jun 2026 06:07:44 -0700 Subject: [PATCH] test: make sonic takeover fixtures explicit --- archivebox/tests/conftest.py | 9 ++++++--- archivebox/tests/test_takeover_util.py | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/archivebox/tests/conftest.py b/archivebox/tests/conftest.py index ee840541..8f7977be 100644 --- a/archivebox/tests/conftest.py +++ b/archivebox/tests/conftest.py @@ -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( diff --git a/archivebox/tests/test_takeover_util.py b/archivebox/tests/test_takeover_util.py index 899c2e85..d0e24226 100644 --- a/archivebox/tests/test_takeover_util.py +++ b/archivebox/tests/test_takeover_util.py @@ -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()), )