File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
5858 go run golang.org/x/tools/cmd/goimports@latest -w queries.sql.go
5959
6060 go run ../../scripts/dbgen
61- # This will error if a view is broken.
62- go test -run=TestViewSubset
61+ # This will error if a view is broken. This is in it's own package to avoid
62+ # stuff like dbmock breaking builds if it's out of date from the interface.
63+ go test ./gentest
6364)
Original file line number Diff line number Diff line change 1+ // Package gentest contains tests that are run at db generate time. These tests
2+ // need to exist in their own package to avoid importing stuff that gets
3+ // generated after the DB.
4+ //
5+ // E.g. if we put these tests in coderd/database, then we'd be importing dbmock
6+ // which is generated after the DB and can cause type problems when building
7+ // the tests.
8+ package gentest
Original file line number Diff line number Diff line change 1- package database_test
1+ package gentest_test
22
33import (
44 "reflect"
You can’t perform that action at this time.
0 commit comments