mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: check for nil pointer in AwaitWorkspaceAgents
CompletedAt is a pointer and can be nil, need to check before calling IsZero() on it c.f. https://github.com/coder/coder/runs/17534657301
This commit is contained in:
@ -857,6 +857,9 @@ func AwaitWorkspaceAgents(t testing.TB, client *codersdk.Client, workspaceID uui
|
||||
if !assert.NoError(t, err) {
|
||||
return false
|
||||
}
|
||||
if workspace.LatestBuild.Job.CompletedAt == nil {
|
||||
return false
|
||||
}
|
||||
if workspace.LatestBuild.Job.CompletedAt.IsZero() {
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user