This commit is contained in:
@@ -158,8 +158,9 @@ def test_created_task_runner_honors_explicit_ai_planner_opt_out(
|
||||
assert type(task_runner.planner) is Planner
|
||||
|
||||
|
||||
def test_cloud_transport_builds_ai_planner_with_cloud_proxy_client(
|
||||
tmp_path, monkeypatch: pytest.MonkeyPatch
|
||||
@pytest.mark.parametrize("transport", [None, "cloud"])
|
||||
def test_default_and_explicit_cloud_transport_build_ai_planner_with_cloud_proxy_client(
|
||||
tmp_path, monkeypatch: pytest.MonkeyPatch, transport: str | None
|
||||
) -> None:
|
||||
monkeypatch.delenv("AI_PLANNER_ENABLED", raising=False)
|
||||
manager = DeviceManager()
|
||||
@@ -167,7 +168,7 @@ def test_cloud_transport_builds_ai_planner_with_cloud_proxy_client(
|
||||
control_plane_url="https://control-plane.example",
|
||||
host_id="host-a",
|
||||
token="token-a",
|
||||
ai_planner_transport="cloud",
|
||||
**({} if transport is None else {"ai_planner_transport": transport}),
|
||||
)
|
||||
factories = create_execution_factories(
|
||||
manager,
|
||||
@@ -182,9 +183,8 @@ def test_cloud_transport_builds_ai_planner_with_cloud_proxy_client(
|
||||
assert task_runner.planner.client.config is host_agent_config
|
||||
|
||||
|
||||
@pytest.mark.parametrize("transport", [None, "direct"])
|
||||
def test_direct_transport_preserves_existing_local_provider_construction(
|
||||
tmp_path, monkeypatch: pytest.MonkeyPatch, transport: str | None
|
||||
def test_explicit_direct_transport_preserves_local_provider_construction(
|
||||
tmp_path, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
monkeypatch.delenv("AI_PLANNER_ENABLED", raising=False)
|
||||
manager = DeviceManager()
|
||||
@@ -192,7 +192,7 @@ def test_direct_transport_preserves_existing_local_provider_construction(
|
||||
control_plane_url="https://control-plane.example",
|
||||
host_id="host-a",
|
||||
token="token-a",
|
||||
**({} if transport is None else {"ai_planner_transport": transport}),
|
||||
ai_planner_transport="direct",
|
||||
)
|
||||
factories = create_execution_factories(
|
||||
manager,
|
||||
|
||||
Reference in New Issue
Block a user