(t *testing.T, fname string)
| 258 | } |
| 259 | |
| 260 | func verifyJSONLogFormat(t *testing.T, fname string) { |
| 261 | t.Helper() |
| 262 | |
| 263 | f, err := os.Open(fname) |
| 264 | require.NoError(t, err) |
| 265 | |
| 266 | defer f.Close() |
| 267 | |
| 268 | s := bufio.NewScanner(f) |
| 269 | |
| 270 | for s.Scan() { |
| 271 | require.True(t, json.Valid(s.Bytes()), "log line is not valid JSON: %q", s.Text()) |
| 272 | } |
| 273 | } |
no test coverage detected