Audit test utils fix (#74276)

* changes audit e2e event version scheme; adds internal audit to common audit scheme; removes unneeded comments

* add more detail to audit missing events in e2e/integration tests

* adds version priority to audit scheme; updates comment
This commit is contained in:
Patrick Barker
2019-02-22 01:19:51 -07:00
committed by Kubernetes Prow Robot
parent 9e53b85d28
commit 9e4f8d6fae
5 changed files with 53 additions and 19 deletions

View File

@@ -214,12 +214,12 @@ func testAudit(t *testing.T, version string) {
t.Fatalf("Unexpected error: %v", err)
}
defer stream.Close()
missing, err := utils.CheckAuditLines(stream, expectedEvents, versions[version])
missingReport, err := utils.CheckAuditLines(stream, expectedEvents, versions[version])
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
if len(missing) > 0 {
t.Errorf("Failed to match all expected events, events %#v not found!", missing)
if len(missingReport.MissingEvents) > 0 {
t.Errorf(missingReport.String())
}
}