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

Function TestLoggerUniqueness

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

Source from the content-addressed store, hash-verified

69}
70
71func TestLoggerUniqueness(t *testing.T) {
72 ctxA := context.Background()
73 ctxB := context.Background()
74
75 loggerA, _ := LoggerFor(ctxA)
76 defer loggerA.Close()
77 defer os.Remove(loggerA.LogFile())
78
79 loggerB, _ := LoggerFor(ctxB)
80 defer loggerB.Close()
81 defer os.Remove(loggerB.LogFile())
82
83 assert.NotEqual(t, loggerA.(*logger).id, loggerB.(*logger).id)
84 assert.NotEqual(t, loggerA.LogFile(), loggerB.LogFile())
85}
86
87func TestLoggerIsolation(t *testing.T) {
88 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