Skip to content

Commit 7b6af6e

Browse files
committed
fix: Discard ptytest output to avoid issues on macOS
1 parent b1f6ec6 commit 7b6af6e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cli/templatecreate_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cli_test
22

33
import (
4+
"io"
45
"os"
56
"testing"
67

@@ -218,10 +219,8 @@ func TestTemplateCreate(t *testing.T) {
218219
}
219220
cmd, root := clitest.New(t, args...)
220221
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)
225224

226225
return cmd.Execute()
227226
}
@@ -233,9 +232,8 @@ func TestTemplateCreate(t *testing.T) {
233232
}
234233
cmd, root := clitest.New(t, args...)
235234
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)
239237

240238
return cmd.Execute()
241239
}

0 commit comments

Comments
 (0)