You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by az...@apache.org on 2023/05/10 07:28:16 UTC

[shardingsphere] branch master updated: Update pipeline E2E doc (#25552)

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

azexin 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 e3317dee550 Update pipeline E2E doc (#25552)
e3317dee550 is described below

commit e3317dee5508ee19679e6e3761fe9398bbbb6d96
Author: Hongsheng Zhong <zh...@apache.org>
AuthorDate: Wed May 10 15:28:08 2023 +0800

    Update pipeline E2E doc (#25552)
---
 .../test-manual/pipeline-e2e-test/_index.cn.md     | 33 +++++++++++--------
 .../test-manual/pipeline-e2e-test/_index.en.md     | 37 +++++++++++++---------
 2 files changed, 42 insertions(+), 28 deletions(-)

diff --git a/docs/document/content/test-manual/pipeline-e2e-test/_index.cn.md b/docs/document/content/test-manual/pipeline-e2e-test/_index.cn.md
index ae157285bef..ec491f860b1 100644
--- a/docs/document/content/test-manual/pipeline-e2e-test/_index.cn.md
+++ b/docs/document/content/test-manual/pipeline-e2e-test/_index.cn.md
@@ -10,10 +10,10 @@ weight = 4
 
 ## 测试环境类型
 
-目前支持 Native 和 Docker。
+目前支持 NATIVE 和 DOCKER。
 
-1. Native:运行在开发者本机环境。需要在本机启动 ShardingSphere-Proxy 实例(通过 proxy 安装包或者在 IDE 运行 `org.apache.shardingsphere.proxy.Bootstrap`)和数据库实例。一般用于本机调试。
-2. Docker:运行在 Maven 插件拉起的 Docker 环境。一般用于 GitHub Action,也可以在本机运行。
+1. NATIVE:运行在开发者本机环境。需要在本机启动 ShardingSphere-Proxy 实例和数据库实例。一般用于本机调试。
+2. DOCKER:运行在 Maven 插件拉起的 docker 环境。一般用于 GitHub Action,也可以在本机运行。
 
 支持的数据库:MySQL、PostgreSQL、openGauss。
 
@@ -49,11 +49,18 @@ weight = 4
 
 `it-env.properties` 所有属性都可以通过 Maven 命令行 `-D` 的方式传入,优先级高于配置文件。
 
-#### Native 环境启动
+#### NATIVE 环境启动
 
-开发者在本地提前启动 ShardingSphere-Proxy、注册中心(如 ZooKeeper)和数据库。
-要求 ShardingSphere-Proxy 的端口是 3307。
-以 MySQL 为例,`it-env.properties` 可以配置如下:
+1. 在本地启动 ShardingSphere-Proxy(使用 3307 端口):参考 [proxy 启动手册](/cn/user-manual/shardingsphere-proxy/startup/bin/),或者修改 `proxy/bootstrap/src/main/resources/conf/server.yaml` 之后在 IDE 运行 `org.apache.shardingsphere.proxy.Bootstrap`。
+
+Proxy 配置可以参考:
+- test/e2e/operation/pipeline/src/test/resources/env/mysql/server-8.yaml
+- test/e2e/operation/pipeline/src/test/resources/env/postgresql/server.yaml
+- test/e2e/operation/pipeline/src/test/resources/env/opengauss/server.yaml
+
+2. 启动注册中心(如 ZooKeeper)和数据库。
+
+3. 以 MySQL 为例,`it-env.properties` 可以配置如下:
 ```
 pipeline.it.env.type=NATIVE
 pipeline.it.native.database=mysql
@@ -62,32 +69,32 @@ pipeline.it.native.mysql.password=root
 pipeline.it.native.mysql.port=3306
 ```
 
-找到对应的测试类,在 IDE 启动运行。
+4. 找到对应的测试类,在 IDE 启动运行。
 
-#### Docker 环境启动
+#### DOCKER 环境启动
 
 参考 `.github/workflows/e2e-pipeline.yml`。
 
-第一步:打包镜像
+1. 打包镜像
 
 ```
 ./mvnw -B clean install -am -pl test/e2e/operation/pipeline -Pit.env.docker -DskipTests
 ```
 
-运行以上命令会构建出一个用于 E2E 测试的 Docker 镜像 `apache/shardingsphere-proxy-test:latest`。
+运行以上命令会构建出一个用于 E2E 测试的 docker 镜像 `apache/shardingsphere-proxy-test:latest`。
 
 该镜像设置了远程调试的端口,默认是 `3308`。
 
 如果仅修改了测试代码,可以复用已有的测试镜像。
 
-第二步:修改 `it-env.properties` 配置
+2. 修改 `it-env.properties` 配置
 
 ```
 pipeline.it.env.type=DOCKER
 pipeline.it.docker.mysql.version=mysql:5.7
 ```
 
-第三步:通过 Maven 运行测试用例。以 MySQL 为例:
+3. 通过 Maven 运行测试用例。以 MySQL 为例:
 
 ```
 ./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.mysql.version=mysql:5.7
diff --git a/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md b/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md
index 01a7ec548ca..b3d21c704ed 100644
--- a/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md
+++ b/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md
@@ -10,9 +10,9 @@ Verify the functional correctness of pipeline scenarios.
 
 ## Test environment type
 
-Currently, Native and Docker are available.
-1. Native : Run on developer local machine. Need to start ShardingSphere-Proxy instance (run proxy installation package or run `org.apache.shardingsphere.proxy.Bootstrap` in IDE) and database instance by developer. It could be used for local debugging.
-2. Docker : Run on Docker started by Maven plugin. It could be used for GitHub Actions, and it could be used for local debugging too.
+Currently, NATIVE and DOCKER are available.
+1. NATIVE : Run on developer local machine. Need to start ShardingSphere-Proxy instance and database instance by developer. It could be used for local debugging.
+2. DOCKER : Run on docker started by Maven plugin. It could be used for GitHub Actions, and it could be used for local debugging too.
 
 Supported databases: MySQL, PostgreSQL and openGuass.
 
@@ -22,7 +22,7 @@ Module path: `test/e2e/operation/pipeline`.
 
 ### Environment setup
 
-`${DOCKER-IMAGE}` refers to the name of a Docker mirror, such as `mysql:5.7`. `${DATABASE-TYPE}` refers to database types.
+`${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/`
 - `it-env.properties`: Environment setup configuration file.
@@ -48,11 +48,18 @@ Functions included:
 
 Any property of `it-env.properties` could be defined by Maven command line parameter `-D`, and its priority is higher than configuration file.
 
-#### Native environment setup
+#### NATIVE environment setup
 
-Start ShardingSphere-Proxy, registry center (e.g. ZooKeeper) and database.
-Suppose ShardingSphere-Proxy port is 3307.
-Take MySQL as an example, `it-env.properties` could be configured as follows: 
+1. Start ShardingSphere-Proxy (port should be 3307): refer to [proxy startup guide](/en/user-manual/shardingsphere-proxy/startup/bin/), or run `org.apache.shardingsphere.proxy.Bootstrap` in IDE after modifying `proxy/bootstrap/src/main/resources/conf/server.yaml`.
+
+Refer to following files for proxy `server.yaml` configuration:
+- test/e2e/operation/pipeline/src/test/resources/env/mysql/server-8.yaml
+- test/e2e/operation/pipeline/src/test/resources/env/postgresql/server.yaml
+- test/e2e/operation/pipeline/src/test/resources/env/opengauss/server.yaml
+
+2. Start registry center (e.g. ZooKeeper) and database.
+
+3. Take MySQL as an example, `it-env.properties` could be configured as follows: 
 ```
 pipeline.it.env.type=NATIVE
 pipeline.it.native.database=mysql
@@ -61,32 +68,32 @@ pipeline.it.native.mysql.password=root
 pipeline.it.native.mysql.port=3306
 ```
 
-Find test class and start it on IDE.
+4. Find test class and start it on IDE.
 
-#### Docker environment setup
+#### DOCKER environment setup
 
 Refer to `.github/workflows/e2e-pipeline.yml` for more details.
 
-Step 1: Build docker image.
+1. Build docker image.
 
 ```
 ./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`.
+Running the above command will build a docker image `apache/shardingsphere-proxy-test:latest`.
 
-The Docker image has port `3308` for remote debugging.
+The docker image has port `3308` for remote debugging.
 
 If only test code is modified, you could reuse existing docker image.
 
-Step 2: Configure `it-env.properties`.
+2. Configure `it-env.properties`.
 
 ```
 pipeline.it.env.type=DOCKER
 pipeline.it.docker.mysql.version=mysql:5.7
 ```
 
-Step 3: Run test cases.
+3. Run test cases.
 
 Take MySQL as an example:
 ```