This project uses GitHub Actions to make sure that every PR passes automated tests. To reproduce these tests locally, use:
./validate --nofmt --cov
Tests for some-file.go
should be placed in the file some-file_test.go
in the same package.
For more info on how to write tests in Go, see the Go docs.
If your adapter makes HTTP calls using standard JSON, you should use the RunJSONBidderTest function.
This will be much more thorough, convenient, maintainable, and reusable than writing standard Go tests for your adapter.
Code which creates new goroutines should include tests which thoroughly exercise its concurrent behavior.
The names of functions which test concurrency should start with TestRace
. For example TestRaceAuction
or TestRaceCurrency
.
The ./validate.sh
script will run these using the Race Detector.