Skip to content

Commit 6c14258

Browse files
committed
cli: filter out NOTICE lines in debug zip test output
These lines are not errors and are expected in output. Resolves: #151256 Epic: None Release note: None
1 parent f966877 commit 6c14258

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/cli/testutils.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,9 @@ func captureOutput(f func()) (out string, err error) {
368368
// both specific names and total number of system and internal tables that
369369
// are exported. The regex matches the rest of the line after the prefix
370370
// unless the line contains an uppercase E to avoid trimming "ERROR" message
371-
// lines, which are expected (and tested) for certain tables.
372-
out = regexp.MustCompile(`(.*retrieving SQL data for ([^E\n])*\n)+`).
371+
// lines (but not NOTICE which is informational), which are expected
372+
// (and tested) for certain tables.
373+
out = regexp.MustCompile(`(.*retrieving SQL data for (([^E\n])*|.*NOTICE.*)\n)+`).
373374
ReplaceAllString(out, "<dumping SQL tables>\n")
374375
}()
375376

0 commit comments

Comments
 (0)