MCPcopy Create free account
hub / github.com/conforma/cli / TestLoggerCaching

Function TestLoggerCaching

acceptance/log/log_test.go:58–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestLoggerCaching(t *testing.T) {
59 ctx := context.Background()
60
61 loggerA, ctx := LoggerFor(ctx)
62 defer loggerA.Close()
63 defer os.Remove(loggerA.LogFile())
64
65 // Second call with same context returns the cached logger
66 loggerB, _ := LoggerFor(ctx)
67
68 assert.Equal(t, loggerA, loggerB)
69}
70
71func TestLoggerUniqueness(t *testing.T) {
72 ctxA := context.Background()

Callers

nothing calls this directly

Calls 3

LoggerForFunction · 0.85
CloseMethod · 0.65
LogFileMethod · 0.65

Tested by

no test coverage detected