Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Bind the Patrol finalisation fixture to its tenant service

pulse-triage[bot]424b6ea1ccde
diff --git a/internal/api/ai_handlers_investigation_additional_test.go b/internal/api/ai_handlers_investigation_additional_test.go
index 20f99d8446..40e74db426 100644
--- a/internal/api/ai_handlers_investigation_additional_test.go
+++ b/internal/api/ai_handlers_investigation_additional_test.go
@@ -971,9 +971,14 @@ func orchestratorPatrolFor(t *testing.T, audits unifiedresources.ResourceStore)
t.Cleanup(func() { SetCreateInvestigationOrchestrator(prevOrchestratorFactory) })
tenantSvc := ai.NewService(nil, nil)
+ tenantSvc.SetOrgID("tenant-1")
tenantSvc.SetStateProvider(&MockStateProvider{})
+ // Audit reconciliation resolves the run's service through GetAIService.
+ // Register the service owning these findings, rather than letting the
+ // persistence manager create a second, unrelated service for the tenant.
handler := &AISettingsHandler{
mtPersistence: config.NewMultiTenantPersistence(t.TempDir()),
+ aiServices: map[string]*ai.Service{"tenant-1": tenantSvc},
investigationStores: make(map[string]aicontracts.InvestigationStore),
}
if audits != nil {