Commit 722c86aa authored by Saad Ali's avatar Saad Ali

Merge pull request #15948 from gmarek/fix-test

Add handling of old non-capitalized event reason to scheduler-predicates test
parents 06113d3b bae456cb
......@@ -110,6 +110,22 @@ func verifyResult(c *client.Client, podName string, ns string) {
"reason": "FailedScheduling",
}.AsSelector())
expectNoError(err)
// If we failed to find event with a capitalized first letter of reason
// try looking for one starting with a small one for backward compatibility.
// If we don't do it we end up in #15806.
// TODO: remove this block when we don't care about supporting v1.0 too much.
if len(schedEvents.Items) == 0 {
schedEvents, err = c.Events(ns).List(
labels.Everything(),
fields.Set{
"involvedObject.kind": "Pod",
"involvedObject.name": podName,
"involvedObject.namespace": ns,
"source": "scheduler",
"reason": "failedScheduling",
}.AsSelector())
expectNoError(err)
}
printed := false
printOnce := func(msg string) string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment