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.

test: Add edge case for normalizeNodeHost URL parse error

rcourtmanfb417ed742b2
diff --git a/internal/api/config_handlers_host_test.go b/internal/api/config_handlers_host_test.go
index 0e81857cb2..fadf8df96a 100644
--- a/internal/api/config_handlers_host_test.go
+++ b/internal/api/config_handlers_host_test.go
@@ -385,6 +385,12 @@ func TestNormalizeNodeHost(t *testing.T) {
nodeType: "pve",
wantErr: true,
},
+ {
+ name: "control character in host returns error",
+ rawHost: "\x00invalid",
+ nodeType: "pve",
+ wantErr: true,
+ },
// Unknown node type (no default port added)
{
name: "unknown node type keeps host without port",