mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-24 11:29:09 +00:00
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:
@@ -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
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user