good morning!!!!

Skip to content
Snippets Groups Projects
Commit d9cf91ca authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Improving tests scripts.

parent c4ae43c3
No related branches found
No related tags found
No related merge requests found
TEST_HOST ?= 127.0.0.1
build:
go build && go install
reset-db:
$(MAKE) -C _dumps
test: reset-db
go test -v
$(MAKE) -C _example
bench: reset-db
go test -v -test.bench=.
......@@ -5,5 +5,5 @@ DB_USERNAME ?= upperio_tests
DB_PASSWORD ?= upperio_secret
DB_NAME ?= upperio_tests
load:
reset-db:
cat structs.sql | PGPASSWORD="$(DB_PASSWORD)" psql -U$(DB_USERNAME) $(DB_NAME) -h$(TEST_HOST) -p$(TEST_PORT)
TEST_HOST ?= 127.0.0.1
TEST_PORT ?= 5432
DB_USERNAME ?= upperio_tests
DB_PASSWORD ?= upperio_secret
DB_NAME ?= upperio_tests
test:
cat example.sql | PGPASSWORD="$(DB_PASSWORD)" psql -U$(DB_USERNAME) $(DB_NAME) -h$(TEST_HOST) -p$(TEST_PORT)
go run -v main.go
#!/bin/sh
cat example.sql | PGPASSWORD=upperio psql -Uupperio upperio_tests -htestserver.local
go run main.go
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment