mirror of
https://github.com/minio/minio.git
synced 2025-01-26 06:03:17 -05:00
e29009d347
Commit 5c1376516867aeca06f114868e329e1d710f7148 removed postgre registration triggerd by the automatic gofmt command but it was the only where pg is registered. This commit fixes behavior and adds unit tests to check whether postgre & sql are registered or not.
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