Skip to content

Commit ea9a1da

Browse files
committed
clarifying comments
1 parent e1f8326 commit ea9a1da

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cli/provisionerjobs_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ func TestProvisionerJobs(t *testing.T) {
3636
templateAdminClient, templateAdmin := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID, rbac.ScopedRoleOrgTemplateAdmin(owner.OrganizationID))
3737
memberClient, member := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
3838

39-
// Create minimal template setup without provisioner overhead
39+
// These CLI tests are related to provisioner job CRUD operations and as such
40+
// do not require the overhead of starting a provisioner. Other provisioner job
41+
// functionalities (acquisition etc.) are tested elsewhere.
4042
template := dbgen.Template(t, db, database.Template{
4143
OrganizationID: owner.OrganizationID,
4244
CreatedBy: owner.UserID,
@@ -51,7 +53,7 @@ func TestProvisionerJobs(t *testing.T) {
5153
t.Run("Cancel", func(t *testing.T) {
5254
t.Parallel()
5355

54-
// Set up test helpers - simplified to avoid provisioner daemon overhead.
56+
// Test helper to create a provisioner job of a given type with a given input.
5557
prepareJob := func(t *testing.T, jobType database.ProvisionerJobType, input json.RawMessage) database.ProvisionerJob {
5658
t.Helper()
5759
return dbgen.ProvisionerJob(t, db, coderdAPI.Pubsub, database.ProvisionerJob{
@@ -63,6 +65,7 @@ func TestProvisionerJobs(t *testing.T) {
6365
})
6466
}
6567

68+
// Test helper to create a workspace build job with a predefined input.
6669
prepareWorkspaceBuildJob := func(t *testing.T) database.ProvisionerJob {
6770
t.Helper()
6871
wbID := uuid.New()
@@ -84,6 +87,7 @@ func TestProvisionerJobs(t *testing.T) {
8487
return job
8588
}
8689

90+
// Test helper to create a template version import job with a predefined input.
8791
prepareTemplateVersionImportJob := func(t *testing.T) database.ProvisionerJob {
8892
t.Helper()
8993
tvID := uuid.New()
@@ -100,6 +104,7 @@ func TestProvisionerJobs(t *testing.T) {
100104
return job
101105
}
102106

107+
// Test helper to create a template version import dry run job with a predefined input.
103108
prepareTemplateVersionImportJobDryRun := func(t *testing.T) database.ProvisionerJob {
104109
t.Helper()
105110
tvID := uuid.New()

0 commit comments

Comments
 (0)