mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* initial Db helper split - make SQL and datastore packages optional * abstracting log store * break out DB, MQ and log drivers as extensions * cleanup * fewer deps * fixing docker test * hmm dbness * updating db startup * Consolidate all your extensions into one convenient package * cleanup * clean up dep constraints
658 B
658 B
Tests
Running Tests
go test is used for testing. A running PostgreSQL
server is required, with the ability to log in. The
database to connect to test with is "pqgotest," on
"localhost" but these can be overridden using environment
variables.
Example:
PGHOST=/run/postgresql go test
Benchmarks
A benchmark suite can be run as part of the tests:
go test -bench .
Example setup (Docker)
Run a postgres container:
docker run --expose 5432:5432 postgres
Run tests:
PGHOST=localhost PGPORT=5432 PGUSER=postgres PGSSLMODE=disable PGDATABASE=postgres go test