mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
* chore: add /v2 to import module path go mod requires semantic versioning with versions greater than 1.x This was a mechanical update by running: ``` go install github.com/marwan-at-work/mod/cmd/mod@latest mod upgrade ``` Migrate generated files to import /v2 * Fix gen
27 lines
530 B
Go
27 lines
530 B
Go
package clitest_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"go.uber.org/goleak"
|
|
|
|
"github.com/coder/coder/v2/cli/clitest"
|
|
"github.com/coder/coder/v2/coderd/coderdtest"
|
|
"github.com/coder/coder/v2/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)
|
|
i, config := clitest.New(t)
|
|
clitest.SetupConfig(t, client, config)
|
|
pty := ptytest.New(t).Attach(i)
|
|
clitest.Start(t, i)
|
|
pty.ExpectMatch("coder")
|
|
}
|