Skip to content

fix: Allow template names to be re-used after deletion #2454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 17, 2022
Merged
Prev Previous commit
Next Next commit
fix: Discard ptytest output to avoid issues on macOS
  • Loading branch information
mafredri committed Jun 17, 2022
commit 7b6af6ef2718d130ce49b7d520fb62be4cc3f190
12 changes: 5 additions & 7 deletions cli/templatecreate_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cli_test

import (
"io"
"os"
"testing"

Expand Down Expand Up @@ -218,10 +219,8 @@ func TestTemplateCreate(t *testing.T) {
}
cmd, root := clitest.New(t, args...)
clitest.SetupConfig(t, client, root)
pty := ptytest.New(t)
cmd.SetIn(pty.Input())
cmd.SetOut(pty.Output())
cmd.SetErr(pty.Output())
cmd.SetOut(io.Discard)
cmd.SetErr(io.Discard)

return cmd.Execute()
}
Expand All @@ -233,9 +232,8 @@ func TestTemplateCreate(t *testing.T) {
}
cmd, root := clitest.New(t, args...)
clitest.SetupConfig(t, client, root)
pty := ptytest.New(t)
cmd.SetIn(pty.Input())
cmd.SetOut(pty.Output())
cmd.SetOut(io.Discard)
cmd.SetErr(io.Discard)

return cmd.Execute()
}
Expand Down