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.

Use a non-empty backup in scoped replay contract controls

pulse-triage[bot]d2ae24d62d15
diff --git a/internal/api/contract_test.go b/internal/api/contract_test.go
index 804456e174..731c7d36ea 100644
--- a/internal/api/contract_test.go
+++ b/internal/api/contract_test.go
@@ -27996,6 +27996,11 @@ func TestContract_ConfigImportReplayRemainsAuthenticatedAndScoped(t *testing.T)
router := NewRouter(cfg, defaultMonitor, mtm, nil, nil, "test")
cleanupTestRouter(t, router)
source := config.NewConfigPersistence(t.TempDir())
+ // A populated target deliberately refuses an empty-node replacement.
+ // Use an ordinary valid backup, not an attempted inventory wipe.
+ if err := source.SaveNodesConfig([]config.PVEInstance{{Name: "replay-fixture", Host: "https://replay-fixture.invalid:8006", TokenName: "synthetic@pve!monitor", TokenValue: "synthetic-replay-secret", Disabled: true, VerifySSL: true}}, nil, nil); err != nil {
+ t.Fatal(err)
+ }
archive, err := source.ExportConfig("synthetic-replay-passphrase")
if err != nil {
t.Fatal(err)