fix: Order database queries for templates (#3249)

* fix: Order database queries for templates

Fixes a race in a test where the order of templates varies.

* fix: Add sorting to databasefake as well
This commit is contained in:
Mathias Fredriksson
2022-07-27 18:04:29 +03:00
committed by GitHub
parent 5802c29c38
commit cef622d77c
3 changed files with 23 additions and 3 deletions

View File

@ -34,6 +34,7 @@ WHERE
id = ANY(@ids)
ELSE true
END
ORDER BY (created_at, id) ASC
;
-- name: GetTemplateByOrganizationAndName :one
@ -49,7 +50,9 @@ LIMIT
1;
-- name: GetTemplates :many
SELECT * FROM templates;
SELECT * FROM templates
ORDER BY (created_at, id) ASC
;
-- name: InsertTemplate :one
INSERT INTO