File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 1
1
package clitest_test
2
2
3
3
import (
4
- "context"
5
4
"testing"
6
- "time"
7
5
8
- "github.com/stretchr/testify/require"
9
6
"go.uber.org/goleak"
10
7
11
8
"github.com/coder/coder/cli/clitest"
@@ -19,20 +16,15 @@ func TestMain(m *testing.M) {
19
16
20
17
func TestCli (t * testing.T ) {
21
18
t .Parallel ()
22
- ctx , cancelFunc := context .WithTimeout (context .Background (), 5 * time .Second )
23
- defer cancelFunc ()
24
19
clitest .CreateTemplateVersionSource (t , nil )
25
20
client := coderdtest .New (t , nil )
26
21
cmd , config := clitest .New (t )
27
22
clitest .SetupConfig (t , client , config )
28
23
pty := ptytest .New (t )
29
24
cmd .SetIn (pty .Input ())
30
25
cmd .SetOut (pty .Output ())
31
- errC := make (chan error )
32
26
go func () {
33
- errC <- cmd .ExecuteContext ( ctx )
27
+ _ = cmd .Execute ( )
34
28
}()
35
29
pty .ExpectMatch ("coder" )
36
- cancelFunc ()
37
- require .NoError (t , <- errC )
38
30
}
You can’t perform that action at this time.
0 commit comments