File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ test: test-clean
172
172
.PHONY : test
173
173
174
174
test-postgres : test-clean test-postgres-docker
175
- DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum --junitfile=" gotests.xml" --packages=" ./..." -- \
175
+ DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum --junitfile=" gotests.xml" --packages=" ./..." -- \
176
176
-covermode=atomic -coverprofile=" gotests.coverage" -timeout=30m \
177
177
-coverpkg=./...,github.com/coder/coder/codersdk \
178
178
-count=2 -race -failfast
Original file line number Diff line number Diff line change @@ -27,7 +27,14 @@ func main() {
27
27
panic (err )
28
28
}
29
29
30
- err = database .MigrateUp (db )
30
+ targetURL := fmt .Sprintf ("postgres://postgres:postgres@127.0.0.1:5432/%s?sslmode=disable" , dbName )
31
+ target , err := sql .Open ("postgres" , targetURL )
32
+ if err != nil {
33
+ panic (err )
34
+ }
35
+ defer target .Close ()
36
+
37
+ err = database .MigrateUp (target )
31
38
if err != nil {
32
39
panic (err )
33
40
}
You can’t perform that action at this time.
0 commit comments