Skip to content

Commit 18e3807

Browse files
author
Kenichi Omichi
committed
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.
1 parent 2c2ca27 commit 18e3807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/common/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func ObserveEventAfterAction(f *framework.Framework, eventPredicate func(*v1.Eve
121121
e, ok := obj.(*v1.Event)
122122
ginkgo.By(fmt.Sprintf("Considering event: \nType = [%s], Name = [%s], Reason = [%s], Message = [%s]", e.Type, e.Name, e.Reason, e.Message))
123123
framework.ExpectEqual(ok, true)
124-
if ok && eventPredicate(e) {
124+
if eventPredicate(e) {
125125
observedMatchingEvent = true
126126
}
127127
},

0 commit comments

Comments
 (0)