Verify the functional correctness of pipeline scenarios.
Currently, NATIVE and DOCKER are available.
Supported databases: MySQL, PostgreSQL and openGauss.
Module path: test/e2e/operation/pipeline
.
${DOCKER-IMAGE}
refers to the name of a docker mirror, such as mysql:5.7
. ${DATABASE-TYPE}
refers to database types.
Directory: src/test/resources/env/
e2e-env.properties
: Environment setup configuration file.${DATABASE-TYPE}/global.yaml
: ShardingSphere-Proxy configuration fi;e.${DATABASE-TYPE}/initdb.sql
: Database initialization SQL file.${DATABASE-TYPE}/*.cnf,*.conf
: Database configuration files.common/*.xml
: DistSQL files.scenario/
: SQL files for different scenarios.Test case example: MySQLMigrationGeneralE2EIT. Functions included:
Any property of e2e-env.properties
could be defined by Maven command line parameter -D
, and its priority is higher than configuration file.
org.apache.shardingsphere.proxy.Bootstrap
in IDE after modifying proxy/bootstrap/src/main/resources/conf/global.yaml
.Refer to following files for proxy global.yaml
configuration:
Start registry center (e.g. ZooKeeper) and database.
Take MySQL as an example, e2e-env.properties
could be configured as follows:
e2e.run.type=NATIVE
e2e.native.database.port=3306
e2e.native.database.username=root
e2e.native.database.password=root
Refer to .github/workflows/e2e-operation.yml
for more details.
./mvnw -B clean install -am -pl test/e2e/operation/pipeline -Pit.env.docker -DskipTests
Running the above command will build a docker image apache/shardingsphere-proxy-test:latest
.
The docker image has port 3308
for remote debugging.
If only test code is modified, you could reuse the existing docker image.
e2e-env.properties
.e2e.run.type=DOCKER
e2e.docker.database.mysql.images=mysql:5.7
Take MySQL as an example:
./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -De2e.run.type=docker -De2e.docker.database.mysql.images=mysql:5.7