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.

Make report branding PDF assertion case-insensitive

rcourtmanef4f204d2598
diff --git a/pkg/reporting/report_branding_test.go b/pkg/reporting/report_branding_test.go
index 43a1dbc436..edc94d6c72 100644
--- a/pkg/reporting/report_branding_test.go
+++ b/pkg/reporting/report_branding_test.go
@@ -147,14 +147,15 @@ func renderBrandedClientReport(t *testing.T, resourceID string, start, end time.
func assertPDFContainsOnlyClient(t *testing.T, text, brand, resource string, forbidden []string) {
t.Helper()
- if !strings.Contains(text, brand) {
+ normalizedText := strings.ToLower(text)
+ if !strings.Contains(normalizedText, strings.ToLower(brand)) {
t.Fatalf("report missing brand %q:\n%s", brand, text)
}
if !strings.Contains(text, resource) {
t.Fatalf("report missing resource %q:\n%s", resource, text)
}
for _, value := range forbidden {
- if strings.Contains(text, value) {
+ if strings.Contains(normalizedText, strings.ToLower(value)) {
t.Fatalf("report included forbidden value %q:\n%s", value, text)
}
}