Skip to content

coderd: autostart: codersdk, http api, database plumbing #879

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 16 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: appease the linter gods
  • Loading branch information
johnstcn committed Apr 6, 2022
commit ccd67cce52ff2cd90be4004491f8399ead1b7b7e
4 changes: 2 additions & 2 deletions coderd/database/databasefake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ func (q *fakeQuerier) UpdateProvisionerJobWithCompleteByID(_ context.Context, ar
return sql.ErrNoRows
}

func (q *fakeQuerier) UpdateWorkspaceAutostart(ctx context.Context, arg database.UpdateWorkspaceAutostartParams) error {
func (q *fakeQuerier) UpdateWorkspaceAutostart(_ context.Context, arg database.UpdateWorkspaceAutostartParams) error {
q.mutex.Lock()
defer q.mutex.Unlock()

Expand All @@ -1226,7 +1226,7 @@ func (q *fakeQuerier) UpdateWorkspaceAutostart(ctx context.Context, arg database
return sql.ErrNoRows
}

func (q *fakeQuerier) UpdateWorkspaceAutostop(ctx context.Context, arg database.UpdateWorkspaceAutostopParams) error {
func (q *fakeQuerier) UpdateWorkspaceAutostop(_ context.Context, arg database.UpdateWorkspaceAutostopParams) error {
q.mutex.Lock()
defer q.mutex.Unlock()

Expand Down
2 changes: 0 additions & 2 deletions coderd/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,6 @@ func (api *api) putWorkspaceAutostart(rw http.ResponseWriter, r *http.Request) {
})
return
}

return
}

// TODO(cian): api.updateWorkspaceAutostop
Expand Down
2 changes: 2 additions & 0 deletions coderd/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func TestWorkspaceBuildByName(t *testing.T) {
}

func TestWorkspaceUpdateAutostart(t *testing.T) {
t.Parallel()
var dublinLoc = mustLocation(t, "Europe/Dublin")

testCases := []struct {
Expand Down Expand Up @@ -251,6 +252,7 @@ func TestWorkspaceUpdateAutostart(t *testing.T) {
for _, testCase := range testCases {
testCase := testCase
t.Run(testCase.name, func(t *testing.T) {
t.Parallel()
var (
ctx = context.Background()
client = coderdtest.New(t, nil)
Expand Down