Remove duplicated check in ObserveEventAfterAction

In ObserveEventAfterAction(), observedMatchingEvent is set if ok is
true. Now the ok is already checked with framework.ExpectEqual().
So this removes duplicated check for code cleanup.
This commit is contained in:
Kenichi Omichi 2019-07-27 01:03:10 +00:00
parent 2c2ca27bfc
commit 18e3807cd7

View File

@ -121,7 +121,7 @@ func ObserveEventAfterAction(f *framework.Framework, eventPredicate func(*v1.Eve
e, ok := obj.(*v1.Event)
ginkgo.By(fmt.Sprintf("Considering event: \nType = [%s], Name = [%s], Reason = [%s], Message = [%s]", e.Type, e.Name, e.Reason, e.Message))
framework.ExpectEqual(ok, true)
if ok && eventPredicate(e) {
if eventPredicate(e) {
observedMatchingEvent = true
}
},