setupCLITaskTestWithoutSnapshot creates a task in the specified status without a log snapshot. Note: We do not use IncludeProvisionerDaemon because these tests use dbfake to directly set up database state and don't need actual provisioning. This also avoids potential interference from the provisione
(t *testing.T, status codersdk.TaskStatus)
| 404 | // set up database state and don't need actual provisioning. This also avoids potential |
| 405 | // interference from the provisioner daemon polling for jobs. |
| 406 | func setupCLITaskTestWithoutSnapshot(t *testing.T, status codersdk.TaskStatus) (*codersdk.Client, codersdk.Task) { |
| 407 | t.Helper() |
| 408 | |
| 409 | ownerClient, db := coderdtest.NewWithDatabase(t, nil) |
| 410 | owner := coderdtest.CreateFirstUser(t, ownerClient) |
| 411 | userClient, user := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID) |
| 412 | |
| 413 | task := createTaskInStatus(t, db, owner.OrganizationID, user.ID, status) |
| 414 | |
| 415 | return userClient, task |
| 416 | } |
| 417 | |
| 418 | // createTaskInStatus creates a task in the specified status using dbfake. |
| 419 | func createTaskInStatus(t *testing.T, db database.Store, orgID, ownerID uuid.UUID, status codersdk.TaskStatus) codersdk.Task { |
no test coverage detected