Skip to content

Commit

Permalink
Revert dropped test context
Browse files Browse the repository at this point in the history
  • Loading branch information
zivkovicmilos committed Apr 25, 2024
1 parent b898d26 commit eb5a3a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gno.land/cmd/gnoland/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"path/filepath"
"testing"
"time"

"github.com/gnolang/gno/tm2/pkg/commands"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -42,8 +43,12 @@ func TestStartInitialize(t *testing.T) {
io.SetOut(commands.WriteNopCloser(mockOut))
io.SetErr(commands.WriteNopCloser(mockErr))

// Create and run the command
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()

cmd := newRootCmd(io)
require.NoError(t, cmd.ParseAndRun(context.Background(), args))
require.NoError(t, cmd.ParseAndRun(ctx, args))

// Make sure the directory is created
assert.DirExists(t, nodeDir)
Expand Down

0 comments on commit eb5a3a2

Please sign in to comment.