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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
package notifications
import (
"strings"
"testing"
)
func TestSendWebhookRequestRevalidatesURL(t *testing.T) {
nm := NewNotificationManager("")
defer nm.Stop()
webhook := WebhookConfig{
Name: "blocked",
URL: "http://127.0.0.1/webhook",
}
err := nm.sendWebhookRequest(webhook, []byte(`{}`), "alert", "test-alert:alert")
if err == nil {
t.Fatalf("expected validation error for localhost webhook URL")
}
if !strings.Contains(err.Error(), "webhook URL validation failed") {
t.Fatalf("expected validation error, got %v", err)
}
}