Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
fix: correct error message in fake/EventSender.AssertSentEventTypes
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Chila <[email protected]>
  • Loading branch information
pchila authored Apr 12, 2022
1 parent 003ee3f commit 2466736
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/lib/v0_2_0/fake/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package fake
import (
"context"
"fmt"
cloudevents "github.com/cloudevents/sdk-go/v2"
"sync"

cloudevents "github.com/cloudevents/sdk-go/v2"
)

// EventSender fakes the sending of CloudEvents
Expand Down Expand Up @@ -38,7 +39,7 @@ func (es *EventSender) Send(ctx context.Context, event cloudevents.Event) error
// AssertSentEventTypes checks if the given event types have been passed to the SendEvent function
func (es *EventSender) AssertSentEventTypes(eventTypes []string) error {
if len(es.SentEvents) != len(eventTypes) {
return fmt.Errorf("expected %d event, got %d", len(es.SentEvents), len(eventTypes))
return fmt.Errorf("expected %d event, got %d", len(eventTypes), len(es.SentEvents))
}
for index, event := range es.SentEvents {
if event.Type() != eventTypes[index] {
Expand Down

0 comments on commit 2466736

Please sign in to comment.