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 test for isNotImplementedError fallback branch

rcourtmane2172b16deb0
diff --git a/pkg/proxmox/cluster_client_test.go b/pkg/proxmox/cluster_client_test.go
index 7e95853712..88936d3129 100644
--- a/pkg/proxmox/cluster_client_test.go
+++ b/pkg/proxmox/cluster_client_test.go
@@ -206,6 +206,8 @@ func TestIsNotImplementedError(t *testing.T) {
{"not implemented but 500", "not implemented status 500", false},
{"not implemented but 404", "not implemented error 404", false},
{"space before 501 with not implemented", " 501 not implemented", true},
+ // Tab character triggers extractStatusCode fallback (regex \s+ matches tab but " 501" check doesn't)
+ {"tab before 501 with not implemented", "not implemented api error\t501", true},
}
for _, tt := range tests {