Report known logging errors in test output
The integration tests check container logs for errors. When an error is
encountered that matches a list of expected errors, it was hidden, and
the test passed.
Modify the integration tests to report known errors in logs via
`t.Skipf`.
@@ -405,11 +405,16 @@ func TestLogs(t *testing.T) {
}
for _, line := range outputLines {
- if errRegex.MatchString(line) && !knownErrorsRegex.MatchString(line) {
+ if errRegex.MatchString(line) {
+ if knownErrorsRegex.MatchString(line) {
+ // report all known logging errors in the output
+ t.Skipf("Found known error in %s log: %s", name, line)
+ } else {
if proxy {
- t.Skipf("Found proxy error in %s log: %s", name, line)
+ t.Skipf("Found unexpected proxy error in %s log: %s", name, line)
} else {
- t.Errorf("Found controller error in %s log: %s", name, line)
+ t.Errorf("Found unexpected controller error in %s log: %s", name, line)
+ }
}
}
}
