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/08/24 12:25:47 UTC
[shardingsphere] branch master updated: Use new namespace for
GovernanceSpringBootRegistryEncryptTest (#11987)
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 506378b Use new namespace for GovernanceSpringBootRegistryEncryptTest (#11987)
506378b is described below
commit 506378b678bcc8b853d7b53595e96a3b2d4cd3f1
Author: Haoran Meng <me...@gmail.com>
AuthorDate: Tue Aug 24 20:25:16 2021 +0800
Use new namespace for GovernanceSpringBootRegistryEncryptTest (#11987)
* Use new namespace for GovernanceSpringBootRegistryEncryptTest
* Use new namespace for GovernanceSpringBootRegistryEncryptTest
---
.../GovernanceSpringBootRegistryEncryptTest.java | 4 ++--
.../application-registry-encrypt.properties | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/type/GovernanceSpringBootRegistryEncryptTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/type/GovernanceSpringBootRegis [...]
index 1b605f3..34426f8 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/type/GovernanceSpringBootRegistryEncryptTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/type/GovernanceSpringBootRegistryEncryptTest.java
@@ -54,7 +54,7 @@ import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = GovernanceSpringBootRegistryEncryptTest.class)
@SpringBootApplication
-@ActiveProfiles("registry")
+@ActiveProfiles("registry-encrypt")
public class GovernanceSpringBootRegistryEncryptTest {
private static final String DATA_SOURCE_FILE = "yaml/data-source.yaml";
@@ -70,7 +70,7 @@ public class GovernanceSpringBootRegistryEncryptTest {
String dataSource = readYAML(DATA_SOURCE_FILE);
String encryptRule = readYAML(ENCRYPT_RULE_FILE);
CuratorZookeeperRepository repository = new CuratorZookeeperRepository();
- repository.init(new ClusterPersistRepositoryConfiguration("ZooKeeper", "governance-spring-boot-test", "localhost:3183", new Properties()));
+ repository.init(new ClusterPersistRepositoryConfiguration("ZooKeeper", "governance-spring-boot-registry-encrypt-test", "localhost:3183", new Properties()));
repository.persist("/metadata/logic_db/dataSources", dataSource);
repository.persist("/metadata/logic_db/rules", encryptRule);
repository.persist("/props", ConfigurationPropertyKey.SQL_SHOW.getKey() + ": 'true'\n");
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/application-registry-encrypt.properties b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/application-registry-encrypt.properties
new file mode 100644
index 0000000..55a3a5b
--- /dev/null
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/application-registry-encrypt.properties
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+
+spring.shardingsphere.mode.type=Cluster
+spring.shardingsphere.mode.repository.type=ZooKeeper
+spring.shardingsphere.mode.repository.props.namespace=governance-spring-boot-registry-encrypt-test
+spring.shardingsphere.mode.repository.props.serverLists=localhost:3183
+spring.shardingsphere.mode.overwrite=true