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.

Give configuration recovery fixtures valid synthetic authentication

pulse-triage[bot]f0e7eef1ef39
diff --git a/internal/api/configapi/config_import_runtime_outcome_test.go b/internal/api/configapi/config_import_runtime_outcome_test.go
index bb726c0355..de32d553d7 100644
--- a/internal/api/configapi/config_import_runtime_outcome_test.go
+++ b/internal/api/configapi/config_import_runtime_outcome_test.go
@@ -95,7 +95,7 @@ func TestHandleImportConfigRuntimeOutcome(t *testing.T) {
importedAlerts.GuestDefaults.CPU = &alerts.HysteresisThreshold{Trigger: 73, Clear: 68}
archive := config.ExportData{
Version: "4.4", System: *config.DefaultSystemSettings(), Alerts: importedAlerts,
- Nodes: config.NodesConfig{PVEInstances: []config.PVEInstance{{Name: "runtime-fixture", Host: "https://runtime.invalid:8006", Disabled: true, VerifySSL: true}}},
+ Nodes: config.NodesConfig{PVEInstances: []config.PVEInstance{{Name: "runtime-fixture", Host: "https://runtime.invalid:8006", TokenName: "synthetic@pve!monitor", TokenValue: "synthetic-runtime-token", Disabled: true, VerifySSL: true}}},
Email: notifications.EmailConfig{Enabled: false, SMTPHost: "after.invalid", Password: "synthetic-email-secret"},
Webhooks: []notifications.WebhookConfig{{ID: "after", URL: "https://after.invalid", Enabled: false}},
GuestMetadata: map[string]*config.GuestMetadata{"synthetic:101": {Description: "imported metadata"}},
diff --git a/internal/api/contract_test.go b/internal/api/contract_test.go
index a6a7aa332c..3f88f18416 100644
--- a/internal/api/contract_test.go
+++ b/internal/api/contract_test.go
@@ -28074,7 +28074,7 @@ func TestContract_ConfigImportIncompleteRuntimeKeepsCommittedOutcome(t *testing.
cleanupTestRouter(t, router)
source := config.NewConfigPersistence(t.TempDir())
- if err := source.SaveNodesConfig([]config.PVEInstance{{Name: "runtime-fixture", Host: "https://runtime.invalid:8006", Disabled: true, VerifySSL: true}}, nil, nil); err != nil {
+ if err := source.SaveNodesConfig([]config.PVEInstance{{Name: "runtime-fixture", Host: "https://runtime.invalid:8006", TokenName: "synthetic@pve!monitor", TokenValue: "synthetic-runtime-token", Disabled: true, VerifySSL: true}}, nil, nil); err != nil {
t.Fatal(err)
}
if err := source.SaveAPITokens([]config.APITokenRecord{record}); err != nil {