MCPcopy
hub / github.com/benbjohnson/litestream / TestInitLog_AddSource

Function TestInitLog_AddSource

internal/log_test.go:35–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestInitLog_AddSource(t *testing.T) {
36 var buf bytes.Buffer
37 internal.InitLog(&buf, "INFO", "text", true)
38 slog.Default().Info("test message")
39
40 output := buf.String()
41 if !strings.Contains(output, "source=") {
42 t.Fatalf("expected source= in output, got: %s", output)
43 }
44}
45
46func TestInitLog_PrettyAddSource(t *testing.T) {
47 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 2

InitLogFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected