(tb testing.TB, w io.Writer, numlines int)
| 69 | } |
| 70 | |
| 71 | func 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 | |
| 85 | func pathToURI(p string) string { |
| 86 | return "file://" + filepath.ToSlash(p) |
no test coverage detected