Skip to content

feat: cli: consolidate schedule-related commands #2402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 16, 2022
Prev Previous commit
Next Next commit
make lint
  • Loading branch information
johnstcn committed Jun 16, 2022
commit ae6c047c0a82b528d8935bc46c75d0864d4a4f74
3 changes: 1 addition & 2 deletions cli/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func scheduleStop() *cobra.Command {
return err
}

var durMillis *int64 = nil
var durMillis *int64
if args[1] != "manual" {
dur, err := parseDuration(args[1])
if err != nil {
Expand Down Expand Up @@ -299,5 +299,4 @@ func displaySchedule(workspace codersdk.Workspace, out io.Writer) error {

_, _ = fmt.Fprintln(out, tw.Render())
return nil

}
2 changes: 1 addition & 1 deletion cli/schedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestScheduleShow(t *testing.T) {
)

// unset workspace TTL
require.NoError(t, client.UpdateWorkspaceTTL(ctx, workspace.ID, codersdk.UpdateWorkspaceTTLRequest{nil}))
require.NoError(t, client.UpdateWorkspaceTTL(ctx, workspace.ID, codersdk.UpdateWorkspaceTTLRequest{TTLMillis: nil}))

cmd, root := clitest.New(t, cmdArgs...)
clitest.SetupConfig(t, client, root)
Expand Down