MCPcopy Create free account
hub / github.com/AdRoll/baker / writeTestLog

Function writeTestLog

input/list_test.go:71–83  ·  view source on GitHub ↗
(tb testing.TB, w io.Writer, numlines int)

Source from the content-addressed store, hash-verified

69}
70
71func writeTestLog(tb testing.TB, w io.Writer, numlines int) {
72 tb.Helper()
73
74 gzf := gzip.NewWriter(w)
75 defer gzf.Close()
76
77 for i := 0; i < numlines; i++ {
78 ll := randomLogLine()
79 buf := ll.ToText(nil)
80 buf = append(buf, '\n')
81 gzf.Write(buf)
82 }
83}
84
85func pathToURI(p string) string {
86 return "file://" + filepath.ToSlash(p)

Callers 2

makeTestLogFunction · 0.85
newHTTPFileServerFunction · 0.85

Calls 4

randomLogLineFunction · 0.85
CloseMethod · 0.65
ToTextMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected