mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd/database): correct task pending status logic (#21886)
Previously, tasks with pending provisioner jobs (not yet picked up) were incorrectly reported as "initializing". Refs #21887
This commit is contained in:
@@ -997,12 +997,12 @@ func TestTasks(t *testing.T) {
|
||||
wantErrStatusCode int
|
||||
}{
|
||||
{
|
||||
name: "TaskStatusInitializing",
|
||||
name: "TaskStatusPending",
|
||||
// We want to disable the provisioner so that the task
|
||||
// never gets provisioned (ensuring it stays in Initializing).
|
||||
// never gets picked up (ensuring it stays in Pending).
|
||||
disableProvisioner: true,
|
||||
taskInput: "Valid prompt",
|
||||
wantStatus: codersdk.TaskStatusInitializing,
|
||||
wantStatus: codersdk.TaskStatusPending,
|
||||
wantErr: "Unable to update",
|
||||
wantErrStatusCode: http.StatusConflict,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user