You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/03/25 10:06:19 UTC

[shardingsphere] branch master updated: add governance it-test of env (#9814)

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

panjuan 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 52ff284  add governance  it-test of env (#9814)
52ff284 is described below

commit 52ff2849a103f4fc0c26ce28e4761506d098ea04
Author: Jieker <ji...@163.com>
AuthorDate: Thu Mar 25 18:05:42 2021 +0800

    add governance  it-test of env (#9814)
    
    * add governance env
    
    * env fixed
    
    * env fixed
    
    * env fixed
    
    * env fixed
    
    * env fixed
    
    * env fixed
    
    * env fixed
    
    * env fixed
    
    * rename senario
---
 .github/workflows/it.yml                           |  2 +-
 .../docker/sharding_governance/docker-compose.yml  | 74 ++++++++++++++++++++++
 .../proxy/conf/config-sharding-governance.yaml}    | 35 +++++++---
 .../sharding_governance/proxy/conf/logback.xml     | 33 ++++++++++
 .../sharding_governance/proxy/conf/server.yaml}    | 34 +++++++---
 .../src/test/resources/env/engine-env.properties   |  4 +-
 .../env/sharding_governance/authority.xml          | 70 ++++++++++++++++++++
 .../env/sharding_governance/databases.xml          | 21 ++++++
 .../resources/env/sharding_governance/dataset.xml  | 42 ++++++++++++
 .../env/sharding_governance/init-sql/h2/init.sql   | 20 ++++++
 .../sharding_governance/init-sql/mysql/init.sql    | 28 ++++++++
 .../sharding_governance/init-sql/oracle/init.sql   | 25 ++++++++
 .../init-sql/postgresql/init.sql                   | 18 ++++++
 .../init-sql/sqlserver/init.sql                    | 25 ++++++++
 .../rules.yaml}                                    | 25 ++++----
 .../sharding_governance/scenario-env.properties    | 46 ++++++++++++++
 16 files changed, 467 insertions(+), 35 deletions(-)

diff --git a/.github/workflows/it.yml b/.github/workflows/it.yml
index 65496e8..9e5c144 100644
--- a/.github/workflows/it.yml
+++ b/.github/workflows/it.yml
@@ -33,7 +33,7 @@ jobs:
       matrix:
         env: [ docker ]
         adapter: [ proxy, jdbc ]
-        scenario: [ db,tbl,dbtbl_with_read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt, read_write_splitting]
+        scenario: [ db,tbl,dbtbl_with_read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt, read_write_splitting, sharding_governance]
     steps:
       - name: Cache Maven Repos
         uses: actions/cache@v2
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/docker-compose.yml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/docker-compose.yml
new file mode 100644
index 0000000..3947fca
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/docker-compose.yml
@@ -0,0 +1,74 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+version: "2.1"
+
+services:
+  mysql:
+    image: "mysql/mysql-server:5.7"
+    container_name: sharding-governance-mysql
+    command: ['--sql_mode=', '--default-authentication-plugin=mysql_native_password']
+    volumes:
+      - ../../env/sharding_governance/init-sql/mysql:/docker-entrypoint-initdb.d/
+    ports:
+      - "33660:3306"
+    environment:
+      - LANG=C.UTF-8
+  
+  zookeeper:
+    image: "zookeeper:3.6.2"
+    container_name: sharding-governance-register-center
+    ports:
+      - "26810:2181"
+  
+  shardingsphere-proxy_1:
+    image: apache/shardingsphere-proxy-test
+    container_name: sharding-governance-1-shardingsphere-proxy
+    ports:
+      - "33670:3307"
+      - "33680:3308"
+    links:
+      - "mysql:mysql.sharding-governance.host"
+      - "zookeeper:zk"
+    volumes:
+      - ./proxy/conf:/opt/shardingsphere-proxy/conf
+    depends_on:
+      - mysql
+    environment:
+      - WAIT_HOSTS=mysql:3306
+      - WAIT_HOSTS_TIMEOUT=300
+      - WAIT_SLEEP_INTERVAL=5
+      - WAIT_HOST_CONNECT_TIMEOUT=30
+
+  shardingsphere-proxy_2:
+    image: apache/shardingsphere-proxy-test
+    container_name: sharding-governance-2-shardingsphere-proxy
+    ports:
+      - "33770:3307"
+      - "33780:3308"
+    links:
+      - "mysql:mysql.sharding-governance.host"
+      - "zookeeper:zk"
+    volumes:
+      - ./proxy/conf:/opt/shardingsphere-proxy/conf
+    depends_on:
+      - mysql
+    environment:
+      - WAIT_HOSTS=mysql:3306
+      - WAIT_HOSTS_TIMEOUT=300
+      - WAIT_SLEEP_INTERVAL=5
+      - WAIT_HOST_CONNECT_TIMEOUT=30
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/config-sharding-governance.yaml
similarity index 53%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/config-sharding-governance.yaml
index 3792e82..ed960cc 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/config-sharding-governance.yaml
@@ -15,15 +15,30 @@
 # limitations under the License.
 #
 
-# EMBEDDED, DOCKER, NATIVE
-it.env.type=${it.env}
+schemaName: sharding-governance
 
-it.adapters=jdbc
+dataSources:
+  governance:
+    url: jdbc:mysql://mysql.sharding-governance.host:3306/governance_db?serverTimezone=UTC&useSSL=false&characterEncoding=utf-8
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 2
+    minPoolSize: 2
+    maintenanceIntervalMilliseconds: 30000
 
-#it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt,shadow
-it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt
-
-#it.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
-it.databases=H2
-
-it.run.additional.cases=false
+rules:
+- !SHARDING
+  tables:
+    t_order:
+      actualDataNodes: governance_db.t_order
+      tableStrategy:
+        none:
+    t_order_details:
+      actualDataNodes: governance_db.t_order_details
+      tableStrategy:
+        none:
+  bindingTables:
+    - t_order,t_order_details
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/logback.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/logback.xml
new file mode 100644
index 0000000..1494746
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console" />
+    </logger>
+    
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/server.yaml
similarity index 56%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/server.yaml
index 3792e82..f4d424c 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/sharding_governance/proxy/conf/server.yaml
@@ -15,15 +15,29 @@
 # limitations under the License.
 #
 
-# EMBEDDED, DOCKER, NATIVE
-it.env.type=${it.env}
+governance:
+  name: governance_ds
+  registryCenter:
+    type: ZooKeeper
+    serverLists: zk:2181
+    props:
+      retryIntervalMilliseconds: 500
+      timeToLiveSeconds: 60
+      maxRetries: 3
+      operationTimeoutMilliseconds: 500
+  overwrite: true
 
-it.adapters=jdbc
+authentication:
+  users:
+    root:
+      password: root
 
-#it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt,shadow
-it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt
-
-#it.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
-it.databases=H2
-
-it.run.additional.cases=false
+props:
+  max-connections-size-per-query: 1
+  executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-transaction-type: LOCAL
+  proxy-opentracing-enabled: false
+  proxy-hint-enabled: false
+  query-with-cipher-column: true
+  sql-show: false
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
index 3792e82..5b8ea79 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
@@ -20,8 +20,8 @@ it.env.type=${it.env}
 
 it.adapters=jdbc
 
-#it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt,shadow
-it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt
+#it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt,sharding_governance,shadow
+it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt,sharding_governance
 
 #it.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
 it.databases=H2
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/authority.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/authority.xml
new file mode 100644
index 0000000..8118953
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/authority.xml
@@ -0,0 +1,70 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<authority>
+    <sqlset db-types="Oracle,SQLServer,PostgreSQL">
+        <user-create>
+            <sql>CREATE USER default_user</sql>
+            <sql>CREATE ROLE default_role</sql>
+            <sql>CREATE ROLE role2</sql>
+            <sql>CREATE ROLE role3</sql>
+            <sql>CREATE ROLE role4</sql>
+        </user-create>
+        <user-drop>
+            <sql>DROP ROLE IF EXISTS default_role</sql>
+            <sql>DROP ROLE IF EXISTS role_dev</sql>
+            <sql>DROP ROLE IF EXISTS role_dev_new</sql>
+            <sql>DROP ROLE IF EXISTS role2</sql>
+            <sql>DROP ROLE IF EXISTS role3</sql>
+            <sql>DROP ROLE IF EXISTS role4</sql>
+            <sql>DROP USER IF EXISTS user_dev</sql>
+            <sql>DROP USER IF EXISTS user_dev_new</sql>
+            <sql>DROP USER IF EXISTS default_user</sql>
+        </user-drop>
+    </sqlset>
+    <sqlset db-types="SQLServer">
+        <user-create>
+            <sql>CREATE LOGIN login_dev</sql>
+            <sql>CREATE USER user_dev FOR LOGIN login_dev</sql>
+        </user-create>
+        <user-drop>
+            <sql>DROP LOGIN IF EXISTS login_dev</sql>
+            <sql>DROP LOGIN IF EXISTS login_dev_new</sql>
+        </user-drop>
+    </sqlset>
+    <sqlset db-types="MySQL">
+        <user-create>
+            <sql>CREATE ROLE default_role</sql>
+            <sql>CREATE USER user_dev@localhost</sql>
+            <sql>GRANT select,update,insert,delete on governance_db.* to user_dev@localhost</sql>
+        </user-create>
+        <user-drop>
+            <sql>DROP USER IF EXISTS user_dev@localhost</sql>
+            <sql>DROP USER IF EXISTS user_dev_new@localhost</sql>
+            <sql>DROP USER IF EXISTS user_dev@127.0.0.1</sql>
+            <sql>DROP ROLE IF EXISTS default_role</sql>
+            <sql>DROP ROLE IF EXISTS role_dev</sql>
+            <sql>DROP ROLE IF EXISTS role_dev_new</sql>
+            <sql>FLUSH PRIVILEGES</sql>
+        </user-drop>
+    </sqlset>
+    <sqlset db-types="Oracle">
+        <user-create>
+            <sql>CREATE USER user_dev identified by passwd_dev</sql>
+        </user-create>
+    </sqlset>
+</authority>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/databases.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/databases.xml
new file mode 100644
index 0000000..a1dee68
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/databases.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<databases>
+    <database>governance_db</database>
+</databases>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/dataset.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/dataset.xml
new file mode 100644
index 0000000..c813176
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/dataset.xml
@@ -0,0 +1,42 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata data-nodes="governance_db.t_order">
+        <column name="order_id" type="numeric" />
+        <column name="user_id" type="numeric" />
+        <column name="status" type="varchar" />
+    </metadata>
+    <row data-node="governance_db.t_order" values="1000, 10, init" />
+    <row data-node="governance_db.t_order" values="1001, 10, init" />
+    <row data-node="governance_db.t_order" values="1002, 10, init" />
+    <row data-node="governance_db.t_order" values="1003, 10, init" />
+    <row data-node="governance_db.t_order" values="1004, 10, init" />
+    <row data-node="governance_db.t_order" values="1005, 10, init" />
+    <row data-node="governance_db.t_order" values="1006, 10, init" />
+    <row data-node="governance_db.t_order" values="1007, 10, init" />
+    <row data-node="governance_db.t_order" values="1008, 10, init" />
+    <row data-node="governance_db.t_order" values="1009, 10, init" />
+    <row data-node="governance_db.t_order" values="1100, 11, init" />
+    <row data-node="governance_db.t_order" values="1103, 11, init" />
+    <row data-node="governance_db.t_order" values="1104, 11, init" />
+    <row data-node="governance_db.t_order" values="1105, 11, init" />
+    <row data-node="governance_db.t_order" values="1106, 11, init" />
+    <row data-node="governance_db.t_order" values="1107, 11, init" />
+    <row data-node="governance_db.t_order" values="1108, 11, init" />
+    <row data-node="governance_db.t_order" values="1109, 11, init" />
+</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/h2/init.sql b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/h2/init.sql
new file mode 100644
index 0000000..08a712d
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/h2/init.sql
@@ -0,0 +1,20 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+DROP TABLE IF EXISTS t_order;
+
+CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/mysql/init.sql b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/mysql/init.sql
new file mode 100644
index 0000000..f871127
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/mysql/init.sql
@@ -0,0 +1,28 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY '';
+GRANT All privileges ON *.* TO 'root'@'%';
+
+SET character_set_database='utf8';
+SET character_set_server='utf8';
+
+DROP DATABASE IF EXISTS governance_db;
+
+CREATE DATABASE governance_db;
+
+CREATE TABLE governance_db.t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/oracle/init.sql b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/oracle/init.sql
new file mode 100644
index 0000000..391036d
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/oracle/init.sql
@@ -0,0 +1,25 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+CREATE USER 'root'@'%' IDENTIFIED BY '';
+GRANT All privileges ON *.* TO 'root'@'%';
+
+DROP SCHEMA governance_db;
+
+CREATE SCHEMA governance_db;
+
+CREATE TABLE governance_db.t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/postgresql/init.sql b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/postgresql/init.sql
new file mode 100644
index 0000000..6e540ef
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/postgresql/init.sql
@@ -0,0 +1,18 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/sqlserver/init.sql b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/sqlserver/init.sql
new file mode 100644
index 0000000..1ad1823
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/init-sql/sqlserver/init.sql
@@ -0,0 +1,25 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+CREATE USER 'root'@'%' IDENTIFIED BY '';
+GRANT All privileges ON *.* TO 'root'@'%';
+
+DROP DATABASE IF EXISTS governance_db;
+
+CREATE DATABASE governance_db;
+
+CREATE TABLE governance_db.t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/rules.yaml
similarity index 64%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/rules.yaml
index 3792e82..1a422b7 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/rules.yaml
@@ -15,15 +15,16 @@
 # limitations under the License.
 #
 
-# EMBEDDED, DOCKER, NATIVE
-it.env.type=${it.env}
-
-it.adapters=jdbc
-
-#it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt,shadow
-it.scenarios=db,tbl,dbtbl_with_read_write_splitting,read_write_splitting,encrypt,dbtbl_with_read_write_splitting_and_encrypt
-
-#it.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
-it.databases=H2
-
-it.run.additional.cases=false
+rules:
+- !SHARDING
+  tables:
+    t_order:
+      actualDataNodes: governance_db.t_order
+      tableStrategy:
+        none:
+    t_order_details:
+      actualDataNodes: governance_db.t_order_details
+      tableStrategy:
+        none:
+  bindingTables:
+    - t_order,t_order_details
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/scenario-env.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/scenario-env.properties
new file mode 100644
index 0000000..cdaee93
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/scenario-env.properties
@@ -0,0 +1,46 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+it.sharding_governance.mysql.host=127.0.0.1
+it.sharding_governance.mysql.port=33660
+it.sharding_governance.mysql.username=root
+it.sharding_governance.mysql.password=
+
+it.sharding_governance.postgresql.host=127.0.0.1
+it.sharding_governance.postgresql.port=5432
+it.sharding_governance.postgresql.username=postgres
+it.sharding_governance.postgresql.password=postgres
+
+it.sharding_governance.sqlserver.host=127.0.0.1
+it.sharding_governance.sqlserver.port=1433
+it.sharding_governance.sqlserver.username=sa
+it.sharding_governance.sqlserver.password=Jdbc1234
+
+it.sharding_governance.oracle.host=127.0.0.1
+it.sharding_governance.oracle.port=1521
+it.sharding_governance.oracle.username=jdbc
+it.sharding_governance.oracle.password=jdbc
+
+it.sharding_governance.proxy.host=127.0.0.1
+it.sharding_governance.proxy.port=33670
+it.sharding_governance.proxy.username=root
+it.sharding_governance.proxy.password=root
+
+it.sharding_governance_2.proxy.host=127.0.0.1
+it.sharding_governance_2.proxy.port=33770
+it.sharding_governance_2.proxy.username=root
+it.sharding_governance_2.proxy.password=root