Skip to content

Commit e2058d1

Browse files
committed
add test comment
1 parent 3c0dc00 commit e2058d1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

enterprise/coderd/schedule/template_test.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ func TestTemplateUpdateBuildDeadlines(t *testing.T) {
131131
newMaxDeadline: nextQuietHours,
132132
},
133133
{
134-
name: "MaxDealineShouldBeUnset",
134+
// There was a bug if a user has no quiet hours set, and autostop
135+
// req is not turned on, then the max deadline is set to `time.Time{}`.
136+
// This zero value was "in the past", so the workspace deadline would
137+
// be set to "now" + 2 hours.
138+
// This is a mistake because the max deadline being zero means
139+
// there is no max deadline.
140+
name: "MaxDeadlineShouldBeUnset",
135141
now: buildTime,
136142
deadline: buildTime.Add(time.Hour * 8),
137143
maxDeadline: time.Time{}, // No max set

0 commit comments

Comments
 (0)