All of the tests below except the Interoperability tests are run as part of continuous integration before a pull request is approved to be merged.
Source code is often accompanied by *_test.go
files which define unit tests
for the associated code. All unit tests for the repo may be run with the
following command from the root folder of the repo:
make test
The above command skips the CockroachDB tests because a store-uri
argument is
not provided. To perform the CockroachDB tests, run the following command
from the root folder of the repo:
make test-cockroach
For tests that benefit from being run in a fully-constructed environment, the
docker_e2e.sh
script in this folder sets up a full
environment and runs a set of tests in that environment. Docker is the only
prerequisite to running this end-to-end test on your local system.
To test a specific test in the prober test suite,
simply add its name as the first argument to docker_e2e.sh
. For example:
./docker_e2e.sh scd/test_constraint_simple.py
./docker_e2e.sh scd/test_constraint_simple.py::test_constraint_does_not_exist_get
After a docker_e2e.sh
run, the Core Service logs are automatically captured
to core-service-for-testing.log in the repository root.
One of the continuous integration presubmit checks on this repository checks Go style with a linter. To run this check yourself, run the following command in the root folder of this repo:
make lint
The interoperability folder contains a test suite that verifies interoperability between two DSS instances in the same region; see the README for more information.