Revert "fix: remove mock import from production build"

This reverts commit e927a39416.
This commit is contained in:
Pulse Monitor
2025-08-29 16:17:28 +00:00
parent e927a39416
commit 72f2feeb22
+5
View File
@@ -16,6 +16,7 @@ import (
"github.com/rcourtman/pulse-go-rewrite/internal/config"
"github.com/rcourtman/pulse-go-rewrite/internal/discovery"
"github.com/rcourtman/pulse-go-rewrite/internal/errors"
"github.com/rcourtman/pulse-go-rewrite/internal/mock"
"github.com/rcourtman/pulse-go-rewrite/internal/models"
"github.com/rcourtman/pulse-go-rewrite/internal/notifications"
"github.com/rcourtman/pulse-go-rewrite/internal/websocket"
@@ -2118,6 +2119,10 @@ func (m *Monitor) pollPBSInstance(ctx context.Context, instanceName string, clie
// GetState returns the current state
func (m *Monitor) GetState() models.StateSnapshot {
// Check if mock mode is enabled
if mock.IsMockEnabled() {
return mock.GetMockState()
}
return m.state.GetSnapshot()
}