Skip to content

chore: add template_with_user view to include user contextual data #8568

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 17 commits into from
Jul 19, 2023
Merged
Prev Previous commit
Next Next commit
Linting
  • Loading branch information
Emyrk committed Jul 18, 2023
commit 72097c56d7a6b4cc1337e844f582aff96c088d12
3 changes: 0 additions & 3 deletions coderd/database/dbfake/dbfake.go
Original file line number Diff line number Diff line change
Expand Up @@ -2117,9 +2117,6 @@ func (q *FakeQuerier) GetTemplates(_ context.Context) ([]database.Template, erro
defer q.mutex.RUnlock()

templates := slices.Clone(q.templates)
for i := range templates {
templates[i] = templates[i]
}
slices.SortFunc(templates, func(i, j database.TemplateTable) bool {
if i.Name != j.Name {
return i.Name < j.Name
Expand Down
1 change: 1 addition & 0 deletions coderd/database/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

// TestViewSubsetTemplate ensures TemplateTable is a subset of Template
func TestViewSubsetTemplate(t *testing.T) {
t.Parallel()
table := reflect.TypeOf(database.TemplateTable{})
joined := reflect.TypeOf(database.Template{})

Expand Down