Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
raulb committed Dec 19, 2024
1 parent 5fce60e commit 3416f64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ecdysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ type BehavioralTestCommand interface {

func TestBuildCobraCommand_Behavioral(t *testing.T) {
ctx := context.Background()
cobraCmd := &cobra.Command{}
ctx = context.WithValue(ctx, CobraCtxCmd{}, cobraCmd)

ctrl := gomock.NewController(t)

cmd := NewMockBehavioralTestCommand(ctrl)

wantLogger := slog.New(slog.NewTextHandler(nil, nil))
Expand All @@ -124,7 +128,7 @@ func TestBuildCobraCommand_Behavioral(t *testing.T) {

// Set up the remaining expectations before executing the command.
call = cmd.EXPECT().Args(gomock.Any()).Return(nil).After(call)
cmd.EXPECT().Execute(ctx).Return(nil).After(call)
cmd.EXPECT().Execute(gomock.AssignableToTypeOf(ctx)).Return(nil).After(call)

err := got.ExecuteContext(ctx)
if err != nil {
Expand Down

0 comments on commit 3416f64

Please sign in to comment.