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.

Preserve existing kind-detail trimming in mapper regression

pulse-triage[bot]92c2eebd0e78
diff --git a/internal/recovery/mapper/proxmox/mapper_test.go b/internal/recovery/mapper/proxmox/mapper_test.go
index a6f6200ff9..d126b998a8 100644
--- a/internal/recovery/mapper/proxmox/mapper_test.go
+++ b/internal/recovery/mapper/proxmox/mapper_test.go
@@ -1,6 +1,7 @@
package proxmoxmapper
import (
+ "strings"
"testing"
"time"
@@ -934,7 +935,7 @@ func TestFromPVEStorageBackupsExplicitUnknownKindCannotBorrowSubject(t *testing.
if p.SubjectResourceID != "" || p.SubjectRef != nil || p.Evidence != nil {
t.Fatalf("unclassified archive borrowed a current subject: %+v", p)
}
- if p.ID != "pve-backup:opaque" || p.StartedAt == nil || !p.StartedAt.Equal(now) || p.SizeBytes == nil || *p.SizeBytes != b.Size || p.Details["type"] != kind || p.Details["volid"] != b.Volid || p.ProviderScope != "cluster" {
+ if p.ID != "pve-backup:opaque" || p.StartedAt == nil || !p.StartedAt.Equal(now) || p.SizeBytes == nil || *p.SizeBytes != b.Size || p.Details["type"] != strings.TrimSpace(kind) || p.Details["volid"] != b.Volid || p.ProviderScope != "cluster" {
t.Fatalf("lost independent archive facts: %+v", p)
}
if running && (p.Outcome != recovery.OutcomeRunning || p.CompletedAt != nil) || !running && (p.Outcome != recovery.OutcomeSuccess || p.CompletedAt == nil || !p.CompletedAt.Equal(now)) {