mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +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:
parent
2c2ca27bfc
commit
18e3807cd7
@ -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
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user