Skip to content

Commit

Permalink
Fix list-event e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ehl-jf committed Dec 6, 2024
1 parent dfc54fd commit 8c461db
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/commands/list_event_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package commands

import (
"encoding/json"
"strings"
"testing"

"github.com/stretchr/testify/assert"
Expand All @@ -26,9 +26,8 @@ func TestListEventCommand(t *testing.T) {
listEventTestSpec(listEventTestCase{
name: "list-event",
assertOutput: func(t require.TestingT, content []byte) {
var events []string
require.NoError(t, json.Unmarshal(content, &events))
assert.Truef(t, len(events) > 0, "no events received")
events := strings.Split(string(content), ", ")
assert.Truef(t, len(events) > 2, "no events received")
},
}),
}, t)
Expand Down

0 comments on commit 8c461db

Please sign in to comment.