-
Notifications
You must be signed in to change notification settings - Fork 68
Tests
Georgy Savva edited this page Jun 10, 2021
·
1 revision
This project sticks to high test coverage. Almost every line of code is covered with a test.
To ensure end to end correctness of functionality scany runs all tests on a real database for both
libraries database/sql
and pgx
. Tests are fast, parallel and deterministic.
To run the tests, in the scany project root, type:
go test -v -race ./...
scany uses CockroachDB to execute its tests. It will download, cache, and run the CockroachDB binary for you. It will also clean up all data and resources after running the tests. It's very convenient since the only thing you need to run the tests is an internet connection.
Alternatively, you can download the CockroachDB binary yourself and pass the path to the binary into tests:
go test -v -race ./... -cockroach-binary cockroach