Add fleet groups, agent screenshots, deploy guards, and Crucible polish.

This commit is contained in:
AetherForge
2026-06-02 20:51:52 -07:00
parent 01d76b3730
commit 41b5ec7a88
66 changed files with 1773 additions and 388 deletions

View File

@@ -337,8 +337,17 @@ func TestIntegrationAgentCommandOffline(t *testing.T) {
router, _, _, _ := newTestRouter(t)
rec := serveAuthed(t, router, http.MethodPost, "/api/v1/agents/offline-agent/command",
[]byte(`{"action":"pause"}`))
if rec.Code != http.StatusBadRequest {
t.Fatalf("expected 400 for offline agent, got %d body=%s", rec.Code, rec.Body.String())
// Command for a non-connected agent returns 200 with success:false (not a 4xx),
// so the caller can inspect the error without tripping HTTP error handling.
if rec.Code != http.StatusOK {
t.Fatalf("expected 200 for offline agent, got %d body=%s", rec.Code, rec.Body.String())
}
var body map[string]interface{}
if err := json.Unmarshal(rec.Body.Bytes(), &body); err != nil {
t.Fatal(err)
}
if body["success"] != false {
t.Fatalf("expected success=false, got %v", body)
}
}