chore(cloud): verify integration change

This commit is contained in:
2026-07-13 08:06:15 +08:00
parent 3c5f5509c2
commit 22d37ca95b
10 changed files with 60 additions and 33 deletions
+9 -6
View File
@@ -153,12 +153,15 @@ def test_client_applies_bearer_token_to_every_public_method(tmp_path) -> None:
assert client.list_devices() == []
assert client.list_hosts() == []
assert client.list_plugins() == []
assert client.register_plugin(
name="authenticated-plugin",
version="1.0.0",
entry_point_kind="tool",
target="cloud.store:CloudStore",
)["name"] == "authenticated-plugin"
assert (
client.register_plugin(
name="authenticated-plugin",
version="1.0.0",
entry_point_kind="tool",
target="cloud.store:CloudStore",
)["name"]
== "authenticated-plugin"
)
def test_client_raises_typed_authorization_error_without_exposing_token(
+11 -3
View File
@@ -74,7 +74,11 @@ def test_legacy_data_survives_upgrade_and_downgrade(tmp_path) -> None:
"('task-a', 'goal', null, :constraints, 'queued', null, null, "
"'2026-01-01T00:00:00+00:00')"
),
{"constraints": json.dumps({"driver_type": None, "capability_tags": []})},
{
"constraints": json.dumps(
{"driver_type": None, "capability_tags": []}
)
},
)
finally:
engine.dispose()
@@ -83,7 +87,9 @@ def test_legacy_data_survives_upgrade_and_downgrade(tmp_path) -> None:
engine = create_engine(database_url)
try:
with engine.connect() as connection:
assert connection.scalar(text("select count(*) from host_registrations")) == 1
assert (
connection.scalar(text("select count(*) from host_registrations")) == 1
)
assert connection.scalar(text("select count(*) from scheduled_tasks")) == 1
task_columns = {
column["name"] for column in inspect(engine).get_columns("scheduled_tasks")
@@ -96,7 +102,9 @@ def test_legacy_data_survives_upgrade_and_downgrade(tmp_path) -> None:
engine = create_engine(database_url)
try:
with engine.connect() as connection:
assert connection.scalar(text("select count(*) from host_registrations")) == 1
assert (
connection.scalar(text("select count(*) from host_registrations")) == 1
)
assert connection.scalar(text("select count(*) from scheduled_tasks")) == 1
task_columns = {
column["name"] for column in inspect(engine).get_columns("scheduled_tasks")
+4 -3
View File
@@ -25,9 +25,10 @@ def test_compose_defines_database_control_plane_and_outbound_host_agent() -> Non
assert services["host-agent"]["volumes"] == [
"${HOST_AGENT_TASKS_PATH:-./tasks}:/app/tasks"
]
assert services["host-agent"]["environment"][
"HOST_AGENT_CONTROL_PLANE_URL"
] == "http://cloud-api:8001"
assert (
services["host-agent"]["environment"]["HOST_AGENT_CONTROL_PLANE_URL"]
== "http://cloud-api:8001"
)
assert services["host-agent"]["environment"]["AI_PLANNER_ENABLED"] == (
"${AI_PLANNER_ENABLED:-false}"
)
+12 -4
View File
@@ -152,7 +152,9 @@ def test_workflow_runner_failing_planned_goal_marks_run_failed(tmp_path) -> None
assert run.step_results[0].detail["failure_reason"] == "device offline"
def test_workflow_runner_skill_invocation_executes_resolved_tool_calls(tmp_path) -> None:
def test_workflow_runner_skill_invocation_executes_resolved_tool_calls(
tmp_path,
) -> None:
skill_store, skill = _skill_store()
calls: list[dict[str, object]] = []
definition = WorkflowDefinition(
@@ -227,7 +229,9 @@ def test_workflow_runner_branch_paths_and_sequential_advancement(tmp_path) -> No
steps=[
BranchStep(
"branch",
ConditionSpec("world_variable_equals", {"name": "ready", "value": True}),
ConditionSpec(
"world_variable_equals", {"name": "ready", "value": True}
),
on_true="true-step",
on_false="false-step",
),
@@ -320,7 +324,9 @@ def test_workflow_runner_resume_after_branch_crash_advances_to_recorded_target(
steps=[
BranchStep(
"branch",
ConditionSpec("world_variable_equals", {"name": "ready", "value": True}),
ConditionSpec(
"world_variable_equals", {"name": "ready", "value": True}
),
on_true="true-step",
on_false="false-step",
),
@@ -469,7 +475,9 @@ def test_workflow_runner_branch_wait_and_skill_combination(tmp_path) -> None:
steps=[
BranchStep(
"branch",
ConditionSpec("world_variable_equals", {"name": "ready", "value": True}),
ConditionSpec(
"world_variable_equals", {"name": "ready", "value": True}
),
on_true="wait",
on_false="skip",
),