mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor(coderd/schedule): move cron schedule to cron package (#9507)
This removes an indirect import of `coderd/database` from the CLI and results in a logical separation between server related and generalized schedule. No size change (yet). Ref: #9380
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
"github.com/coder/coder/v2/coderd/parameter"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
"github.com/coder/coder/v2/coderd/schedule"
|
||||
"github.com/coder/coder/v2/coderd/schedule/cron"
|
||||
"github.com/coder/coder/v2/coderd/util/ptr"
|
||||
"github.com/coder/coder/v2/codersdk"
|
||||
"github.com/coder/coder/v2/codersdk/agentsdk"
|
||||
@@ -1869,7 +1870,7 @@ func TestWorkspaceUpdateAutostart(t *testing.T) {
|
||||
|
||||
require.EqualValues(t, *testCase.schedule, *updated.AutostartSchedule, "expected autostart schedule to equal requested")
|
||||
|
||||
sched, err := schedule.Weekly(*updated.AutostartSchedule)
|
||||
sched, err := cron.Weekly(*updated.AutostartSchedule)
|
||||
require.NoError(t, err, "parse returned schedule")
|
||||
|
||||
next := sched.Next(testCase.at)
|
||||
|
||||
Reference in New Issue
Block a user