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.

Add regression test for normalizeVersion

rcourtman086b10b6d478
diff --git a/internal/agentupdate/update_test.go b/internal/agentupdate/update_test.go
index 078a28529c..840598b65a 100644
--- a/internal/agentupdate/update_test.go
+++ b/internal/agentupdate/update_test.go
@@ -396,3 +396,12 @@ func TestSymlinkResolution(t *testing.T) {
}
os.Remove(newPath)
}
+
+func TestNormalizeVersion(t *testing.T) {
+ if got := normalizeVersion("v4.33.1"); got != "4.33.1" {
+ t.Errorf("normalizeVersion(%q) = %q, want %q", "v4.33.1", got, "4.33.1")
+ }
+ if got := normalizeVersion("4.33.1"); got != "4.33.1" {
+ t.Errorf("normalizeVersion(%q) = %q, want %q", "4.33.1", got, "4.33.1")
+ }
+}