You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/05/12 15:49:42 UTC

[shardingsphere] branch master updated: Clarify IT image in documents of integration tests (#17607)

This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new aa8a5d468dd Clarify IT image in documents of integration tests (#17607)
aa8a5d468dd is described below

commit aa8a5d468dd77ba8159b3796a596a02dfbecba83
Author: 吴伟杰 <wu...@apache.org>
AuthorDate: Thu May 12 23:49:34 2022 +0800

    Clarify IT image in documents of integration tests (#17607)
---
 .../content/reference/test/integration-test/_index.cn.md  |  6 ++++++
 .../content/reference/test/integration-test/_index.en.md  | 15 +++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/docs/document/content/reference/test/integration-test/_index.cn.md b/docs/document/content/reference/test/integration-test/_index.cn.md
index 0660556356c..3b9dca7b9c0 100644
--- a/docs/document/content/reference/test/integration-test/_index.cn.md
+++ b/docs/document/content/reference/test/integration-test/_index.cn.md
@@ -157,6 +157,12 @@ it.cluster.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
 ```bash
 ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.cluster.adapters=proxy,jdbc -Dit.scenarios=${scenario_name_1,scenario_name_1,scenario_name_n} -Dit.cluster.databases=MySQL
 ```
+运行以上命令会构建出一个用于集成测试的 Docker 镜像 `apache/shardingsphere-proxy-test:latest`。
+如果仅修改了测试代码,可以复用已有的测试镜像,无须重新构建。使用以下命令可以跳过镜像构建,直接运行集成测试:
+
+```bash
+./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/pom.xml -Pit.env.docker -Dit.cluster.adapters=proxy,jdbc -Dit.scenarios=${scenario_name_1,scenario_name_1,scenario_name_n} -Dit.cluster.databases=MySQL
+```
 
 #### 注意事项
 
diff --git a/docs/document/content/reference/test/integration-test/_index.en.md b/docs/document/content/reference/test/integration-test/_index.en.md
index 978550ad929..1d219c198d1 100644
--- a/docs/document/content/reference/test/integration-test/_index.en.md
+++ b/docs/document/content/reference/test/integration-test/_index.en.md
@@ -124,6 +124,21 @@ This file is very like the dataset.xml mentioned before, and the difference is t
 Util now, all config files are ready, just launch the corresponding test case is fine.With no need to modify any Java code, only set up some config files.
 This will reduce the difficulty for ShardingSphere testing.
 
+### Running Integration Tests
+
+#### Run with Docker
+
+```bash
+./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.cluster.adapters=proxy,jdbc -Dit.scenarios=${scenario_name_1,scenario_name_1,scenario_name_n} -Dit.cluster.databases=MySQL
+```
+Running the above command will build a Docker image `apache/shardingsphere-proxy-test:latest` for integration testing.
+The existing test Docker image can be reused without rebuilding if only the test code is modified.
+Use the following command to skip the image building and run the integration tests directly:
+
+```bash
+./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/pom.xml -Pit.env.docker -Dit.cluster.adapters=proxy,jdbc -Dit.scenarios=${scenario_name_1,scenario_name_1,scenario_name_n} -Dit.cluster.databases=MySQL
+```
+
 ## Notice
 
 1. If Oracle needs to be tested, please add Oracle driver dependencies to the pom.xml.