vitess.io/vitess@v0.16.2/test/README.md (about) 1 ##Github CI Workflows 2 3 This document has a short outline of how tests are run in CI, how to add new tests and where these are configured. 4 5 ### Adding a new test 6 7 Unit tests are run by the unit test runner, one per platform, currently mysql57, mysql80. 8 The workflow first installs the required database server before calling `make unit_test`. 9 10 To add a new end-to-end (e2e) test (also called _cluster end to end_ tests): 11 * Add a new object to test/config.json 12 * If you are creating a new test _shard_: 13 * update `clusterList` in `ci_workflow_gen.go` 14 * `make generate_ci_workflows` 15 * If you are adding a new database platform, update the `templates\unit_test.tpl` to add 16 the platform specific packages and update `unitTestDatabases` 17 18 19 ### Vitess test runner 20 The `.github/workflows` directory contains one yaml file per workflow. e2e tests are run using the `test.go` script 21 in the repository root. 22 23 This script invokes the vitess e2e test framework using a json configuration file `test/config.json` which has one object per test. 24 Each test is of the form: 25 26 ```javascript 27 "vtgate": { 28 "File": "unused.go", 29 "Args": ["vitess.io/vitess/go/test/endtoend/vtgate"], 30 "Command": [], 31 "Manual": false, 32 "Shard": 17, 33 "RetryMax": 0, 34 "Tags": [] 35 }, 36 ``` 37 The important parameters here are Args which define the arguments to `go test` and the Shard which says 38 which Test VM should run this test. All tests which have a common Shard value are run in the same test vm. 39 40 ### Known Issue 41 42 * Each VM does not seem to be able to create a lot of vttablets. For this reason we have had to split a few VReplication 43 e2e tests across Shards. We need to identify and if possible fix this limitation so that we can reduce the number of test Shards 44