diff --git a/tests/mcp_peers.rs b/tests/mcp_peers.rs index acf983e..2dca510 100644 --- a/tests/mcp_peers.rs +++ b/tests/mcp_peers.rs @@ -295,7 +295,7 @@ async fn peer_tools_are_absent_without_configuration() { async fn peer_argument_reads_through_the_consolidator() { let fake = FakeTransport::new(); fake.peer("beta").respond( - "/systemd/units", + "/api/v1/systemd/units", 200, "application/json", r#"[{"name":"peer-only.service","active_state":"failed"}]"#, @@ -317,7 +317,7 @@ async fn peer_argument_reads_through_the_consolidator() { let calls = fake.calls(); assert_eq!(calls.len(), 1); - assert_eq!(calls[0].1.path, "/systemd/units"); + assert_eq!(calls[0].1.path, "/api/v1/systemd/units"); assert_eq!( calls[0].1.query, vec![("state".to_owned(), "failed".to_owned())] @@ -354,8 +354,12 @@ async fn rest_and_mcp_report_the_same_peer_status_errors() { ]; for (peer_status, http_status, code, message) in rows { let fake = FakeTransport::new(); - fake.peer("beta") - .respond("/systemd/units", peer_status, "application/json", "{}"); + fake.peer("beta").respond( + "/api/v1/systemd/units", + peer_status, + "application/json", + "{}", + ); let h = start(peers_state(&fake)).await; let (status, head, body) = h.get("/api/v1/peers/beta/systemd/units").await; @@ -391,7 +395,7 @@ async fn rest_and_mcp_report_the_same_peer_status_errors() { async fn peer_failures_are_visible_tool_errors() { let fake = FakeTransport::new(); fake.peer("beta").respond_err( - "/systemd/units", + "/api/v1/systemd/units", skyg_linux_tracker::peers::PeerError::Rejected, ); let h = start(peers_state(&fake)).await; diff --git a/tests/peers_config.rs b/tests/peers_config.rs index 7acc424..af108f7 100644 --- a/tests/peers_config.rs +++ b/tests/peers_config.rs @@ -874,8 +874,12 @@ async fn fake_state_carries_the_registry() { #[tokio::test] async fn registry_proxies_through_the_fake_and_records_the_request() { let fake = FakeTransport::new(); - fake.peer("beta") - .respond("/systemd/units", 200, "application/json", r#"{"units":[]}"#); + fake.peer("beta").respond( + "/api/v1/systemd/units", + 200, + "application/json", + r#"{"units":[]}"#, + ); let reg = registry_with(fake.clone(), fake_peers_config(&["beta"])); let resp = reg @@ -911,7 +915,7 @@ async fn registry_proxies_through_the_fake_and_records_the_request() { async fn unknown_peer_and_peer_failures_use_the_shared_mapping() { let fake = FakeTransport::new(); fake.peer("beta") - .respond_err("/systemd/units", PeerError::Rejected); + .respond_err("/api/v1/systemd/units", PeerError::Rejected); let reg = registry_with(fake, fake_peers_config(&["beta"])); let err = reg