MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / TestSetLogSink

Function TestSetLogSink

internal/logging/logr_test.go:62–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func TestSetLogSink(t *testing.T) {
63 var calls []string
64
65 SetLogSink(&sink{
66 fnInfo: func(_ int, m string, _ ...any) {
67 calls = append(calls, m)
68 },
69 })
70
71 global.Info("called")
72 assert.DeepEqual(t, calls, []string{"called"})
73}

Callers

nothing calls this directly

Calls 2

SetLogSinkFunction · 0.85
InfoMethod · 0.80

Tested by

no test coverage detected