mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
- Adds `testutil.GoleakOptions` and consolidates existing options to this location - Pre-emptively adds required ignore for this Dependabot PR to pass CI https://github.com/coder/coder/pull/16066
28 lines
595 B
Go
28 lines
595 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"
|
|
"github.com/coder/coder/v2/testutil"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
goleak.VerifyTestMain(m, testutil.GoleakOptions...)
|
|
}
|
|
|
|
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")
|
|
}
|