Complete runtime API coverage and roundtrip proof

This commit is contained in:
2026-09-18 01:38:50 +09:00
parent 5038033c3a
commit d837684a33
4 changed files with 249 additions and 19 deletions
-4
View File
@@ -267,10 +267,6 @@ fn runtime_http_router_with_auth_and_ssh_keyscan_program(
.route(
"/v1/workers/{worker_id}/attachments/{artifact_id}",
delete(delete_worker_uploaded_file),
)
.route(
"/v1/workers/{worker_id}/workspace-api",
post(replace_worker_workspace_api),
);
#[cfg(feature = "ws-server")]
@@ -276,6 +276,22 @@ impl runtime_api::RuntimeApi for RuntimeManagementApi {
response(value)
}
async fn replace_worker_workspace_api(
&self,
worker_id: String,
value: runtime_api::WorkerWorkspaceApiRequest,
) -> Result<runtime_api::WorkerResponse, runtime_api::RuntimeApiError> {
let Json(value) = replace_worker_workspace_api(
State(self.state.clone()),
auth_extension(),
Path(worker_id),
Ok(Json(request(value)?)),
)
.await
.map_err(api_error)?;
response(value)
}
async fn complete_worker_arguments(
&self,
worker_id: String,