vitess-gh/test
Florent Poinsard 4dc32005c6
Upgraded sizegen to run goimports in every situation and removed unrequired package from E2E ci tests
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2021-09-16 14:17:21 +02:00
..
bin checked in the binary for testing 2020-07-11 00:19:59 +05:30
templates Upgraded sizegen to run goimports in every situation and removed unrequired package from E2E ci tests 2021-09-16 14:17:21 +02:00
vttest_schema added vttest schema back 2020-03-17 17:19:38 +05:30
README.md Minor refactor, initial README 2021-01-10 22:42:47 +01:00
TestingStrategy.md Update func and md and txt 2019-01-29 21:30:03 -05:00
ci_workflow_gen.go remove normal github-runners for the ones ported to self-hosted runners 2021-09-13 14:42:43 +05:30
client.go inclusive naming: fix a few more master references that were missed earlier 2021-08-20 14:22:39 -07:00
client_java.sh Fix client_test 2020-02-08 14:53:55 -08:00
client_jdbc.sh added mysq jdbc driver test 2021-05-20 13:47:14 +05:30
client_test.sh inclusive naming: fix a few more master references that were missed earlier 2021-08-20 14:22:39 -07:00
config.json buffer: test the new buffering implementation 2021-09-01 18:38:49 +02:00
legacy_local_example.sh Initial changes for blacklist to denylist 2021-08-17 11:07:03 +02:00
local_example.sh Initial changes for blacklist to denylist 2021-08-17 11:07:03 +02:00
region_example.sh region_sharding: working resharding example 2020-08-14 06:09:20 -07:00
vthook-make_mycnf test: update license 2019-10-22 13:12:59 +08:00
vthook-test.sh test: update license 2019-10-22 13:12:59 +08:00
vthook-test_backup_error test: update license 2019-10-22 13:12:59 +08:00
vthook-test_backup_transform test: update license 2019-10-22 13:12:59 +08:00

README.md

##Github CI Workflows

This document has a short outline of how tests are run in CI, how to add new tests and where these are configured.

Adding a new test

Unit tests are run by the unit test runner, one per platform, currently percona56, mysql57, mysql80, mariadb101, mariadb102, mariadb103. The workflow first installs the required database server before calling make unit_test.

To add a new end-to-end (e2e) test (also called cluster end to end tests):

  • Add a new object to test/config.json
  • If you are creating a new test shard:
    • update clusterList in ci_workflow_gen.go
    • make generate_ci_workflows
  • If you are adding a new database platform, update the templates\unit_test.tpl to add the platform specific packages and update unitTestDatabases

Vitess test runner

The .github/workflows directory contains one yaml file per workflow. e2e tests are run using the test.go script in the repository root.

This script invokes the vitess e2e test framework using a json configuration file test/config.json which has one object per test. Each test is of the form:

"vtgate": {
			"File": "unused.go",
			"Args": ["vitess.io/vitess/go/test/endtoend/vtgate"],
			"Command": [],
			"Manual": false,
			"Shard": 17,
			"RetryMax": 0,
			"Tags": []
		},

The important parameters here are Args which define the arguments to go test and the Shard which says which Test VM should run this test. All tests which have a common Shard value are run in the same test vm.

Known Issue

  • 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 e2e tests across Shards. We need to identify and if possible fix this limitation so that we can reduce the number of test Shards