We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c0dc00 commit e2058d1Copy full SHA for e2058d1
enterprise/coderd/schedule/template_test.go
@@ -131,7 +131,13 @@ func TestTemplateUpdateBuildDeadlines(t *testing.T) {
131
newMaxDeadline: nextQuietHours,
132
},
133
{
134
- name: "MaxDealineShouldBeUnset",
+ // 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",
141
now: buildTime,
142
deadline: buildTime.Add(time.Hour * 8),
143
maxDeadline: time.Time{}, // No max set
0 commit comments