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.

440 B
Raw Blame
package mockmode

import (
	"testing"

	"github.com/rcourtman/pulse-go-rewrite/internal/mockruntime"
)

func TestIsEnabledReflectsRuntimeState(t *testing.T) {
	original := mockruntime.IsEnabled()
	t.Cleanup(func() { mockruntime.SetEnabled(original) })

	for _, enabled := range []bool{false, true} {
		mockruntime.SetEnabled(enabled)
		if got := IsEnabled(); got != enabled {
			t.Fatalf("IsEnabled() = %v, want %v", got, enabled)
		}
	}
}