Skip to content

Commit 422e72b

Browse files
committed
chore: Move testutil from internal to root
1 parent 917e4ae commit 422e72b

24 files changed

+22
-22
lines changed

agent/agent_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ import (
3333
"cdr.dev/slog"
3434
"cdr.dev/slog/sloggers/slogtest"
3535
"github.com/coder/coder/agent"
36-
"github.com/coder/coder/internal/testutil"
3736
"github.com/coder/coder/peer"
3837
"github.com/coder/coder/peerbroker"
3938
"github.com/coder/coder/peerbroker/proto"
4039
"github.com/coder/coder/provisionersdk"
4140
"github.com/coder/coder/pty/ptytest"
41+
"github.com/coder/coder/testutil"
4242
)
4343

4444
func TestMain(m *testing.M) {

agent/reaper/reaper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/stretchr/testify/require"
1313

1414
"github.com/coder/coder/agent/reaper"
15-
"github.com/coder/coder/internal/testutil"
15+
"github.com/coder/coder/testutil"
1616
)
1717

1818
func TestReap(t *testing.T) {

cli/cliui/prompt_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
"github.com/stretchr/testify/require"
1414

1515
"github.com/coder/coder/cli/cliui"
16-
"github.com/coder/coder/internal/testutil"
1716
"github.com/coder/coder/pty"
1817
"github.com/coder/coder/pty/ptytest"
18+
"github.com/coder/coder/testutil"
1919
)
2020

2121
func TestPrompt(t *testing.T) {

cli/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
"github.com/coder/coder/cli/clitest"
1414
"github.com/coder/coder/coderd/coderdtest"
1515
"github.com/coder/coder/codersdk"
16-
"github.com/coder/coder/internal/testutil"
1716
"github.com/coder/coder/provisioner/echo"
1817
"github.com/coder/coder/provisionersdk/proto"
1918
"github.com/coder/coder/pty/ptytest"
19+
"github.com/coder/coder/testutil"
2020
)
2121

2222
func TestCreate(t *testing.T) {

cli/list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88

99
"github.com/coder/coder/cli/clitest"
1010
"github.com/coder/coder/coderd/coderdtest"
11-
"github.com/coder/coder/internal/testutil"
1211
"github.com/coder/coder/pty/ptytest"
12+
"github.com/coder/coder/testutil"
1313
)
1414

1515
func TestList(t *testing.T) {

cli/portforward_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
"github.com/coder/coder/cli/clitest"
2222
"github.com/coder/coder/coderd/coderdtest"
2323
"github.com/coder/coder/codersdk"
24-
"github.com/coder/coder/internal/testutil"
2524
"github.com/coder/coder/provisioner/echo"
2625
"github.com/coder/coder/provisionersdk/proto"
26+
"github.com/coder/coder/testutil"
2727
)
2828

2929
func TestPortForward(t *testing.T) {

cli/resetpassword_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"github.com/coder/coder/cli/clitest"
1313
"github.com/coder/coder/coderd/database/postgres"
1414
"github.com/coder/coder/codersdk"
15-
"github.com/coder/coder/internal/testutil"
1615
"github.com/coder/coder/pty/ptytest"
16+
"github.com/coder/coder/testutil"
1717
)
1818

1919
// nolint:paralleltest

cli/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import (
3030
"github.com/coder/coder/coderd/database/postgres"
3131
"github.com/coder/coder/coderd/telemetry"
3232
"github.com/coder/coder/codersdk"
33-
"github.com/coder/coder/internal/testutil"
3433
"github.com/coder/coder/pty/ptytest"
34+
"github.com/coder/coder/testutil"
3535
)
3636

3737
// This cannot be ran in parallel because it uses a signal.

cli/ssh_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import (
2626
"github.com/coder/coder/cli/clitest"
2727
"github.com/coder/coder/coderd/coderdtest"
2828
"github.com/coder/coder/codersdk"
29-
"github.com/coder/coder/internal/testutil"
3029
"github.com/coder/coder/provisioner/echo"
3130
"github.com/coder/coder/provisionersdk/proto"
3231
"github.com/coder/coder/pty/ptytest"
32+
"github.com/coder/coder/testutil"
3333
)
3434

3535
func setupWorkspaceForSSH(t *testing.T) (*codersdk.Client, codersdk.Workspace, string) {

coderd/coderd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ import (
3838
"github.com/coder/coder/coderd/telemetry"
3939
"github.com/coder/coder/coderd/turnconn"
4040
"github.com/coder/coder/codersdk"
41-
"github.com/coder/coder/internal/testutil"
4241
"github.com/coder/coder/provisioner/echo"
4342
"github.com/coder/coder/provisionersdk/proto"
43+
"github.com/coder/coder/testutil"
4444
)
4545

4646
func TestMain(m *testing.M) {

coderd/coderdtest/coderdtest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ import (
5252
"github.com/coder/coder/coderd/util/ptr"
5353
"github.com/coder/coder/codersdk"
5454
"github.com/coder/coder/cryptorand"
55-
"github.com/coder/coder/internal/testutil"
5655
"github.com/coder/coder/provisioner/echo"
5756
"github.com/coder/coder/provisionerd"
5857
"github.com/coder/coder/provisionersdk"
5958
"github.com/coder/coder/provisionersdk/proto"
59+
"github.com/coder/coder/testutil"
6060
)
6161

6262
type Options struct {

coderd/devtunnel/tunnel_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
"cdr.dev/slog/sloggers/slogtest"
2727
"github.com/coder/coder/coderd/devtunnel"
28-
"github.com/coder/coder/internal/testutil"
28+
"github.com/coder/coder/testutil"
2929
)
3030

3131
const (

coderd/httpmw/ratelimit_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/stretchr/testify/require"
1010

1111
"github.com/coder/coder/coderd/httpmw"
12-
"github.com/coder/coder/internal/testutil"
12+
"github.com/coder/coder/testutil"
1313
)
1414

1515
func TestRateLimit(t *testing.T) {

coderd/provisionerdaemons_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
"github.com/coder/coder/coderd/coderdtest"
1313
"github.com/coder/coder/codersdk"
14-
"github.com/coder/coder/internal/testutil"
1514
"github.com/coder/coder/provisionersdk"
15+
"github.com/coder/coder/testutil"
1616
)
1717

1818
func TestProvisionerDaemons(t *testing.T) {

coderd/provisionerjobs_internal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/coder/coder/coderd/database"
2222
"github.com/coder/coder/coderd/database/databasefake"
2323
"github.com/coder/coder/codersdk"
24-
"github.com/coder/coder/internal/testutil"
24+
"github.com/coder/coder/testutil"
2525
)
2626

2727
func TestProvisionerJobLogs_Unit(t *testing.T) {

coderd/templateversions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212

1313
"github.com/coder/coder/coderd/coderdtest"
1414
"github.com/coder/coder/codersdk"
15-
"github.com/coder/coder/internal/testutil"
1615
"github.com/coder/coder/provisioner/echo"
1716
"github.com/coder/coder/provisionersdk/proto"
17+
"github.com/coder/coder/testutil"
1818
)
1919

2020
func TestTemplateVersion(t *testing.T) {

coderd/workspacebuilds_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
"github.com/coder/coder/coderd/coderdtest"
1616
"github.com/coder/coder/coderd/database"
1717
"github.com/coder/coder/codersdk"
18-
"github.com/coder/coder/internal/testutil"
1918
"github.com/coder/coder/provisioner/echo"
2019
"github.com/coder/coder/provisionersdk/proto"
20+
"github.com/coder/coder/testutil"
2121
)
2222

2323
func TestWorkspaceBuild(t *testing.T) {

peer/conn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020

2121
"cdr.dev/slog"
2222
"cdr.dev/slog/sloggers/slogtest"
23-
"github.com/coder/coder/internal/testutil"
2423
"github.com/coder/coder/peer"
24+
"github.com/coder/coder/testutil"
2525
)
2626

2727
var (

provisionerd/provisionerd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"testing"
1313
"time"
1414

15-
"github.com/coder/coder/internal/testutil"
1615
"github.com/coder/coder/provisionerd/runner"
16+
"github.com/coder/coder/testutil"
1717

1818
"github.com/hashicorp/yamux"
1919
"github.com/stretchr/testify/assert"

pty/ptytest/ptytest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/stretchr/testify/require"
1717
"golang.org/x/xerrors"
1818

19-
"github.com/coder/coder/internal/testutil"
2019
"github.com/coder/coder/pty"
20+
"github.com/coder/coder/testutil"
2121
)
2222

2323
func New(t *testing.T) *PTY {

scripts/rules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func doNotCallTFailNowInsideGoroutine(m dsl.Matcher) {
8888
func useStandardTimeoutsAndDelaysInTests(m dsl.Matcher) {
8989
m.Import("github.com/stretchr/testify/require")
9090
m.Import("github.com/stretchr/testify/assert")
91-
m.Import("github.com/coder/coder/internal/testutil")
91+
m.Import("github.com/coder/coder/testutil")
9292

9393
m.Match(`context.WithTimeout($ctx, $duration)`).
9494
Where(m.File().Imports("testing") && !m["duration"].Text.Matches("^testutil\\.")).

site/site_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"github.com/stretchr/testify/assert"
2020
"github.com/stretchr/testify/require"
2121

22-
"github.com/coder/coder/internal/testutil"
2322
"github.com/coder/coder/site"
23+
"github.com/coder/coder/testutil"
2424
)
2525

2626
func TestCaching(t *testing.T) {
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)