(t *testing.T, fname string, re *regexp.Regexp)
| 211 | } |
| 212 | |
| 213 | func verifyFileLogFormat(t *testing.T, fname string, re *regexp.Regexp) { |
| 214 | t.Helper() |
| 215 | |
| 216 | f, err := os.Open(fname) |
| 217 | require.NoError(t, err) |
| 218 | |
| 219 | defer f.Close() |
| 220 | |
| 221 | s := bufio.NewScanner(f) |
| 222 | |
| 223 | for s.Scan() { |
| 224 | require.True(t, re.MatchString(s.Text()), "log line does not match the format: %q (re %q)", s.Text(), re.String()) |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | func isUTC() bool { |
| 229 | _, offset := clock.Now().Zone() |
no test coverage detected