File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -308,11 +308,12 @@ func TestPatchCancelTemplateVersion(t *testing.T) {
308
308
require .Eventually (t , func () bool {
309
309
var err error
310
310
version , err = client .TemplateVersion (ctx , version .ID )
311
+ // job gets marked Failed when there is an Error; in practice we never get to Status = Canceled
312
+ // because provisioners report an Error when canceled. We check the Error string to ensure we don't mask
313
+ // other errors in this test.
311
314
return assert .NoError (t , err ) &&
312
- // The job will never actually cancel successfully because it will never send a
313
- // provision complete response.
314
- assert .Empty (t , version .Job .Error ) &&
315
- version .Job .Status == codersdk .ProvisionerJobCanceling
315
+ version .Job .Error == "canceled" &&
316
+ version .Job .Status == codersdk .ProvisionerJobFailed
316
317
}, testutil .WaitShort , testutil .IntervalFast )
317
318
})
318
319
}
You can’t perform that action at this time.
0 commit comments