mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
ci: add paralleltestctx to lint/go (#19369)
Closes https://github.com/coder/internal/issues/884 We're adding this as a `go run` in `lint/go` for now, since adding it to golangci-lint ourselves involves recompiling golangci-lint and then running that new binary. I'll look into proposing it being added to the public golangci-lint linters. Doesn't appear to cause the lint ci job to take any longer, which is nice.
This commit is contained in:
@@ -403,7 +403,6 @@ func TestTelemetryItem(t *testing.T) {
|
||||
|
||||
func TestPrebuiltWorkspacesTelemetry(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx := testutil.Context(t, testutil.WaitMedium)
|
||||
db, _ := dbtestutil.NewDB(t)
|
||||
|
||||
cases := []struct {
|
||||
@@ -435,6 +434,7 @@ func TestPrebuiltWorkspacesTelemetry(t *testing.T) {
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx := testutil.Context(t, testutil.WaitShort)
|
||||
|
||||
deployment, snapshot := collectSnapshot(ctx, t, db, func(opts telemetry.Options) telemetry.Options {
|
||||
opts.Database = tc.storeFn(db)
|
||||
|
||||
@@ -255,6 +255,7 @@ func Test_ResolveRequest(t *testing.T) {
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx := testutil.Context(t, testutil.WaitShort)
|
||||
|
||||
// Try resolving a request for each app as the owner, without a
|
||||
// token, then use the token to resolve each app.
|
||||
@@ -589,6 +590,7 @@ func Test_ResolveRequest(t *testing.T) {
|
||||
|
||||
t.Run("TokenDoesNotMatchRequest", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx := testutil.Context(t, testutil.WaitShort)
|
||||
|
||||
badToken := workspaceapps.SignedToken{
|
||||
Request: (workspaceapps.Request{
|
||||
|
||||
@@ -1800,6 +1800,7 @@ func TestWorkspaceFilter(t *testing.T) {
|
||||
for _, c := range testCases {
|
||||
t.Run(c.Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx := testutil.Context(t, testutil.WaitShort)
|
||||
workspaces, err := client.Workspaces(ctx, c.Filter)
|
||||
require.NoError(t, err, "fetch workspaces")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user