Merge pull request #92908 from RobertKielty/error_text_clarification

fixes 92907 improves test error output
This commit is contained in:
Kubernetes Prow Robot 2020-07-12 06:59:16 -07:00 committed by GitHub
commit 53334f063f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,7 +419,7 @@ func verifyEvents(e coreclientset.EventInterface, options metav1.ListOptions, nu
count += int(event.Count)
}
if count != num {
return fmt.Errorf("expect event number %d, got %d: %v", num, count, events.Items)
return fmt.Errorf("expected %d events with reason set to %s and message set to %s\nbut %d actual events occurred. Events : %v", num, reason, message, count, events.Items)
}
return nil
}
@ -435,7 +435,7 @@ func verifyTotalEvents(e coreclientset.EventInterface, options metav1.ListOption
count += int(event.Count)
}
if count != num {
return fmt.Errorf("expect event number %d, got %d: %v", num, count, events.Items)
return fmt.Errorf("expected total number of events was %d, actual events counted was %d\nEvents : %v", num, count, events.Items)
}
return nil
}