Add driver and user to migrations in tests
- Prevents logs that driver is missing - Prevents goose_db_version from hanging around
This commit is contained in:
parent
59f767b9e1
commit
2bc3267cce
6
Makefile
6
Makefile
@ -43,7 +43,7 @@ lint:
|
|||||||
|
|
||||||
#Test
|
#Test
|
||||||
TEST_DB = vulcanize_testing
|
TEST_DB = vulcanize_testing
|
||||||
TEST_CONNECT_STRING = postgresql://localhost:5432/$(TEST_DB)?sslmode=disable
|
TEST_CONNECT_STRING = postgresql://postgres@localhost:5432/$(TEST_DB)?sslmode=disable
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: | $(GINKGO) $(LINT)
|
test: | $(GINKGO) $(LINT)
|
||||||
@ -51,8 +51,8 @@ test: | $(GINKGO) $(LINT)
|
|||||||
go fmt ./...
|
go fmt ./...
|
||||||
dropdb --if-exists $(TEST_DB)
|
dropdb --if-exists $(TEST_DB)
|
||||||
createdb $(TEST_DB)
|
createdb $(TEST_DB)
|
||||||
$(GOOSE) -dir db/migrations "$(TEST_CONNECT_STRING)" up
|
$(GOOSE) -dir db/migrations postgres "$(TEST_CONNECT_STRING)" up
|
||||||
$(GOOSE) -dir db/migrations "$(TEST_CONNECT_STRING)" reset
|
$(GOOSE) -dir db/migrations postgres "$(TEST_CONNECT_STRING)" reset
|
||||||
make migrate NAME=$(TEST_DB)
|
make migrate NAME=$(TEST_DB)
|
||||||
$(GINKGO) -r --skipPackage=integration_tests,integration
|
$(GINKGO) -r --skipPackage=integration_tests,integration
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user