mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
Customer feedback indicated projects was a confusing name.
After querying the team internally, it seemed unanimous
that it is indeed a confusing name.
Here's for a lil less confusion @ashmeer7 🥂
33 lines
648 B
Go
33 lines
648 B
Go
package clitest_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
"go.uber.org/goleak"
|
|
|
|
"github.com/coder/coder/cli/clitest"
|
|
"github.com/coder/coder/coderd/coderdtest"
|
|
"github.com/coder/coder/pty/ptytest"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
goleak.VerifyTestMain(m)
|
|
}
|
|
|
|
func TestCli(t *testing.T) {
|
|
t.Parallel()
|
|
clitest.CreateTemplateVersionSource(t, nil)
|
|
client := coderdtest.New(t, nil)
|
|
cmd, config := clitest.New(t)
|
|
clitest.SetupConfig(t, client, config)
|
|
pty := ptytest.New(t)
|
|
cmd.SetIn(pty.Input())
|
|
cmd.SetOut(pty.Output())
|
|
go func() {
|
|
err := cmd.Execute()
|
|
require.NoError(t, err)
|
|
}()
|
|
pty.ExpectMatch("coder")
|
|
}
|