Skip to content

Files

Latest commit

c4d606f · Dec 9, 2022

History

History

test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 10, 2020
Sep 19, 2022
Dec 9, 2022
Sep 8, 2016
Oct 22, 2021
Jan 30, 2019
Oct 14, 2022
Feb 8, 2020
May 20, 2021
Sep 19, 2022
Nov 16, 2022
Sep 29, 2022
Nov 12, 2021
Apr 6, 2022
Oct 22, 2019
Oct 22, 2019
Oct 22, 2019
Oct 22, 2019
Jul 25, 2022

##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 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