mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-30 01:32:00 +01:00
Keep explicit status/current zero availability through decoding and JSON copies so genuine exhaustion cannot become a healthy cache fallback. Connected direct/cluster collector controls cover canonical memory, History and breach/recovery. Complete race validation also exposed a shared-logger guidance fixture race: keep guidance on its caller logger with ordinary fallback, and stop the named scheduler-health fixture monitor. Message, backup precautions, command fences, thresholds and dependencies are unchanged; prior failed proof receipts remain retained. Change-source: pulse-maintainer
23 lines
590 B
Go
23 lines
590 B
Go
package monitoring
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/rs/zerolog"
|
|
"github.com/rs/zerolog/log"
|
|
)
|
|
|
|
func TestGuestFilesystemLoggerKeepsOrdinaryFallback(t *testing.T) {
|
|
if guestFilesystemLogger(context.Background()) != &log.Logger {
|
|
t.Fatal("ordinary filesystem guidance lost its process logger")
|
|
}
|
|
var output bytes.Buffer
|
|
logger := zerolog.New(&output)
|
|
ctx := logger.WithContext(context.Background())
|
|
if guestFilesystemLogger(ctx) != log.Ctx(ctx) || guestFilesystemLogger(ctx) == &log.Logger {
|
|
t.Fatal("filesystem guidance lost its explicit caller logger")
|
|
}
|
|
}
|