MCPcopy
hub / github.com/dgraph-io/dgraph / TestLogWriter

Function TestLogWriter

x/log_writer_test.go:25–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestLogWriter(t *testing.T) {
26 path, _ := filepath.Abs("./log_test/audit.log")
27 defer os.RemoveAll(filepath.Dir(path))
28 lw := &LogWriter{
29 FilePath: path,
30 MaxSize: 1,
31 MaxAge: 1,
32 Compress: false,
33 }
34
35 lw, _ = lw.Init()
36 writeToLogWriterAndVerify(t, lw, path)
37}
38
39func TestLogWriterWithCompression(t *testing.T) {
40 path, _ := filepath.Abs("./log_test/audit.log")

Callers

nothing calls this directly

Calls 3

InitMethod · 0.95
RemoveAllMethod · 0.80

Tested by

no test coverage detected