Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit deeb101

Browse files
committed
fix: coderd workspace tests
1 parent 583d1a3 commit deeb101

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

coderd/workspacebuilds_test.go

+7-14
Original file line numberDiff line numberDiff line change
@@ -1183,9 +1183,8 @@ func TestPostWorkspaceBuild(t *testing.T) {
11831183
})
11841184
}
11851185

1186+
//nolint:paralleltest
11861187
func TestWorkspaceBuildTimings(t *testing.T) {
1187-
// t.Parallel()
1188-
11891188
// Setup the test environment with a template and version
11901189
db, pubsub := dbtestutil.NewDB(t)
11911190
client := coderdtest.New(t, &coderdtest.Options{
@@ -1239,9 +1238,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
12391238
})
12401239
}
12411240

1241+
//nolint:paralleltest
12421242
t.Run("NonExistentBuild", func(t *testing.T) {
1243-
// t.Parallel()
1244-
12451243
// When: fetching an inexistent build
12461244
buildID := uuid.New()
12471245
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
@@ -1253,9 +1251,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
12531251
require.Contains(t, err.Error(), "not found")
12541252
})
12551253

1254+
//nolint:paralleltest
12561255
t.Run("EmptyTimings", func(t *testing.T) {
1257-
// t.Parallel()
1258-
12591256
// When: fetching timings for a build with no timings
12601257
build := makeBuild()
12611258
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
@@ -1268,9 +1265,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
12681265
require.Empty(t, res.AgentScriptTimings)
12691266
})
12701267

1268+
//nolint:paralleltest
12711269
t.Run("ProvisionerTimings", func(t *testing.T) {
1272-
// t.Parallel()
1273-
12741270
// When: fetching timings for a build with provisioner timings
12751271
build := makeBuild()
12761272
provisionerTimings := dbgen.ProvisionerJobTimings(t, db, build, 5)
@@ -1295,9 +1291,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
12951291
}
12961292
})
12971293

1294+
//nolint:paralleltest
12981295
t.Run("AgentScriptTimings", func(t *testing.T) {
1299-
// t.Parallel()
1300-
13011296
// When: fetching timings for a build with agent script timings
13021297
build := makeBuild()
13031298
resource := dbgen.WorkspaceResource(t, db, database.WorkspaceResource{
@@ -1329,9 +1324,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
13291324
}
13301325
})
13311326

1327+
//nolint:paralleltest
13321328
t.Run("NoAgentScripts", func(t *testing.T) {
1333-
// t.Parallel()
1334-
13351329
// When: fetching timings for a build with no agent scripts
13361330
build := makeBuild()
13371331
resource := dbgen.WorkspaceResource(t, db, database.WorkspaceResource{
@@ -1350,9 +1344,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
13501344
})
13511345

13521346
// Some workspaces might not have agents. It is improbable, but possible.
1347+
//nolint:paralleltest
13531348
t.Run("NoAgents", func(t *testing.T) {
1354-
// t.Parallel()
1355-
13561349
// When: fetching timings for a build with no agents
13571350
build := makeBuild()
13581351
dbgen.WorkspaceResource(t, db, database.WorkspaceResource{

0 commit comments

Comments
 (0)