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 main
import (
"testing"
"github.com/rcourtman/pulse-go-rewrite/pkg/pulsecli"
)
func TestGetPassphrase_FromEnv(t *testing.T) {
env := newTestCLIEnv()
process := newTestCLIProcess()
t.Setenv("PULSE_PASSPHRASE", "from-env")
env.Passphrase = ""
got := pulsecli.GetPassphrase(env.ConfigDeps(process), "ignored", false)
if got != "from-env" {
t.Fatalf("got %q", got)
}
}
func TestGetPassphrase_FromFlag(t *testing.T) {
env := newTestCLIEnv()
process := newTestCLIProcess()
t.Setenv("PULSE_PASSPHRASE", "")
env.Passphrase = "from-flag"
got := pulsecli.GetPassphrase(env.ConfigDeps(process), "ignored", false)
if got != "from-flag" {
t.Fatalf("got %q", got)
}
}