remove hive and agent apis nothing calls: build-log routes, /api/compact, host.sock list, mcp.sock wake
This commit is contained in:
parent
cbfd7b2174
commit
36c7781245
1 changed files with 115 additions and 801 deletions
|
|
@ -162,7 +162,6 @@ async fn dispatch(req: &HostRequest, coord: Arc<Coordinator>) -> HostResponse {
|
|||
HostRequest::QueueNodes { ids } => {
|
||||
HostResponse::nodes(coord.job_queue.node_subtrees(ids))
|
||||
}
|
||||
HostRequest::List => HostResponse::list(lifecycle::list().await?),
|
||||
// The agents root is ours and not world-traversable, so this
|
||||
// question is only answerable on this side of the socket —
|
||||
// see the request's doc comment for why the client asks.
|
||||
|
|
@ -745,6 +744,18 @@ mod tests {
|
|||
|
||||
use super::*;
|
||||
|
||||
/// A verb this daemon no longer serves fails to parse (answered with
|
||||
/// `parse error` by the connection loop) while a served verb parses.
|
||||
#[test]
|
||||
fn a_removed_verb_is_a_parse_error_and_a_served_one_parses() {
|
||||
let err =
|
||||
serde_json::from_slice::<HostRequest>(br#"{"cmd":"list"}"#).expect_err("list is gone");
|
||||
assert!(err.to_string().contains("unknown variant `list`"), "{err}");
|
||||
assert!(
|
||||
serde_json::from_slice::<HostRequest>(br#"{"cmd":"subscribe_agent_status"}"#).is_ok()
|
||||
);
|
||||
}
|
||||
|
||||
/// A real `Coordinator` over a throwaway sqlite dir; `handle_with` takes
|
||||
/// an `Arc<Coordinator>` and `open` touches nothing outside the db path.
|
||||
fn coordinator() -> (tempfile::TempDir, Arc<Coordinator>) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue