Skip to content

Commit

Permalink
Merge pull request #206 from spidernet-io/fix/wk/event
Browse files Browse the repository at this point in the history
fix event sdk
  • Loading branch information
weizhoublue authored Jan 30, 2024
2 parents 64fbda0 + 19cb0c2 commit 9251ccd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions framework/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@ func (f *Framework) WaitExceptEventOccurred(ctx context.Context, eventKind, objN
}
f.Log("watch event object %v", event.Object)
switch event.Type {
case watch.Error:
return ErrEvent
case watch.Deleted:
return ErrResDel
default:
event, ok := event.Object.(*corev1.Event)
if !ok {
return ErrGetObj
}
f.Log("Event occurred message is %v \n", event.Message)
f.Log("Event occurred message is %s/%v \n", event.Type, event.Message)
if strings.Contains(event.Message, message) {
return nil
}
Expand Down

0 comments on commit 9251ccd

Please sign in to comment.