Skip to content

Commit 767ada8

Browse files
committed
fix: sort.slice
1 parent e65cdab commit 767ada8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

coderd/database/dbmem/dbmem.go

+4
Original file line numberDiff line numberDiff line change
@@ -4189,6 +4189,10 @@ func (q *FakeQuerier) GetTemplateVersionWorkspaceTags(_ context.Context, templat
41894189
}
41904190
workspaceTags = append(workspaceTags, workspaceTag)
41914191
}
4192+
4193+
sort.Slice(workspaceTags, func(i, j int) bool {
4194+
return workspaceTags[i].Key < workspaceTags[j].Key
4195+
})
41924196
return workspaceTags, nil
41934197
}
41944198

provisioner/terraform/parse_test.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,9 @@ func TestParse(t *testing.T) {
368368
{
369369
Name: "non-tf-files",
370370
Files: map[string]string{
371-
"readme.md": `Hello world`,
372371
"any-file.txt": "Foobar",
373372
},
374-
Response: &proto.ParseComplete{
375-
Readme: []byte("Hello world"),
376-
},
373+
Response: &proto.ParseComplete{},
377374
},
378375
}
379376

0 commit comments

Comments
 (0)