fix: allow unhanger to unhang dormant workspaces (#20229)

This commit is contained in:
Dean Sheather
2025-10-09 17:33:57 +11:00
committed by GitHub
parent c84ab728a8
commit 8942b50872
4 changed files with 149 additions and 5 deletions
+8
View File
@@ -420,6 +420,14 @@ func Workspace(t testing.TB, db database.Store, orig database.WorkspaceTable) da
require.NoError(t, err, "set workspace as deleted")
workspace.Deleted = true
}
if orig.DormantAt.Valid {
_, err = db.UpdateWorkspaceDormantDeletingAt(genCtx, database.UpdateWorkspaceDormantDeletingAtParams{
ID: workspace.ID,
DormantAt: orig.DormantAt,
})
require.NoError(t, err, "set workspace as dormant")
workspace.DormantAt = orig.DormantAt
}
return workspace
}