Skip to content

feat(coderd/database): add support for presets #16509

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 6 commits into from
Feb 11, 2025
Merged
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 tests
  • Loading branch information
SasSwart committed Feb 11, 2025
commit 97cb13da77e1e0ebb192d795abe5bb23ce7d15c7
3 changes: 3 additions & 0 deletions coderd/database/dbauthz/dbauthz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ func (s *MethodTestSuite) TestOrganization() {
JobID: job.ID,
})
insertPresetParams := database.InsertPresetParams{
ID: uuid.New(),
TemplateVersionID: workspaceBuild.TemplateVersionID,
Name: "test",
}
Expand Down Expand Up @@ -3821,11 +3822,13 @@ func (s *MethodTestSuite) TestSystemFunctions() {
CreatedBy: user.ID,
})
preset, err := db.InsertPreset(ctx, database.InsertPresetParams{
ID: uuid.New(),
TemplateVersionID: templateVersion.ID,
Name: "test",
})
require.NoError(s.T(), err)
_, err = db.InsertPresetParameters(ctx, database.InsertPresetParametersParams{
ID: uuid.New(),
TemplateVersionPresetID: preset.ID,
Names: []string{"test"},
Values: []string{"test"},
Expand Down