Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ziflex committed Jul 30, 2022
1 parent a1c7269 commit 8c5bffc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/runtime/expressions/event_wait_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,21 @@ func (m *MockedObservable) Emit(ctx context.Context, eventName string, args core
}

func (m *MockedObservable) Subscribe(_ context.Context, sub events.Subscription) (events.Stream, error) {
calls, found := m.Args[sub.EventName]
calls, found := m.Args[sub.EventName.String()]

if !found {
calls = make([]*values.Object, 0, 10)
m.Args[sub.EventName] = calls
m.Args[sub.EventName.String()] = calls
}

es, found := m.subscribers[sub.EventName]
es, found := m.subscribers[sub.EventName.String()]

if !found {
es = NewMockedEventStream(make(chan events.Message))
m.subscribers[sub.EventName] = es
m.subscribers[sub.EventName.String()] = es
}

m.Args[sub.EventName] = append(calls, sub.Options)
m.Args[sub.EventName.String()] = append(calls, sub.Options)

return es, nil
}
Expand Down

0 comments on commit 8c5bffc

Please sign in to comment.