forked from cerc-io/ipld-eth-server
Enable configuring db user, host, and port in tests
This commit is contained in:
parent
2bc3267cce
commit
0167f884b4
16
Makefile
16
Makefile
@ -41,9 +41,16 @@ metalint: | $(METALINT)
|
|||||||
lint:
|
lint:
|
||||||
$(LINT) $$($(PKGS)) | grep -v -E "exported (function)|(var)|(method)|(type).*should have comment or be unexported"
|
$(LINT) $$($(PKGS)) | grep -v -E "exported (function)|(var)|(method)|(type).*should have comment or be unexported"
|
||||||
|
|
||||||
|
#Database
|
||||||
|
HOST_NAME = localhost
|
||||||
|
PORT = 5432
|
||||||
|
NAME =
|
||||||
|
USER = postgres
|
||||||
|
CONNECT_STRING=postgresql://$(USER)@$(HOST_NAME):$(PORT)/$(NAME)?sslmode=disable
|
||||||
|
|
||||||
#Test
|
#Test
|
||||||
TEST_DB = vulcanize_testing
|
TEST_DB = vulcanize_testing
|
||||||
TEST_CONNECT_STRING = postgresql://postgres@localhost:5432/$(TEST_DB)?sslmode=disable
|
TEST_CONNECT_STRING = postgresql://$(USER)@$(HOST_NAME):$(PORT)/$(TEST_DB)?sslmode=disable
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: | $(GINKGO) $(LINT)
|
test: | $(GINKGO) $(LINT)
|
||||||
@ -71,13 +78,6 @@ build:
|
|||||||
go fmt ./...
|
go fmt ./...
|
||||||
go build
|
go build
|
||||||
|
|
||||||
#Database
|
|
||||||
HOST_NAME = localhost
|
|
||||||
PORT = 5432
|
|
||||||
NAME =
|
|
||||||
USER = postgres
|
|
||||||
CONNECT_STRING=postgresql://$(USER)@$(HOST_NAME):$(PORT)/$(NAME)?sslmode=disable
|
|
||||||
|
|
||||||
# Parameter checks
|
# Parameter checks
|
||||||
## Check that DB variables are provided
|
## Check that DB variables are provided
|
||||||
.PHONY: checkdbvars
|
.PHONY: checkdbvars
|
||||||
|
Loading…
Reference in New Issue
Block a user