File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
package cli_test
2
2
3
3
import (
4
+ "io"
4
5
"os"
5
6
"testing"
6
7
@@ -218,10 +219,8 @@ func TestTemplateCreate(t *testing.T) {
218
219
}
219
220
cmd , root := clitest .New (t , args ... )
220
221
clitest .SetupConfig (t , client , root )
221
- pty := ptytest .New (t )
222
- cmd .SetIn (pty .Input ())
223
- cmd .SetOut (pty .Output ())
224
- cmd .SetErr (pty .Output ())
222
+ cmd .SetOut (io .Discard )
223
+ cmd .SetErr (io .Discard )
225
224
226
225
return cmd .Execute ()
227
226
}
@@ -233,9 +232,8 @@ func TestTemplateCreate(t *testing.T) {
233
232
}
234
233
cmd , root := clitest .New (t , args ... )
235
234
clitest .SetupConfig (t , client , root )
236
- pty := ptytest .New (t )
237
- cmd .SetIn (pty .Input ())
238
- cmd .SetOut (pty .Output ())
235
+ cmd .SetOut (io .Discard )
236
+ cmd .SetErr (io .Discard )
239
237
240
238
return cmd .Execute ()
241
239
}
You can’t perform that action at this time.
0 commit comments