You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2023/04/11 23:52:18 UTC
[shardingsphere] branch master updated: Revise #25043 (#25121)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao 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 38637809f89 Revise #25043 (#25121)
38637809f89 is described below
commit 38637809f89f31d7f0fdd4d5520475184b5a8d92
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Wed Apr 12 07:52:00 2023 +0800
Revise #25043 (#25121)
---
features/encrypt/core/pom.xml | 12 ++++++------
.../encrypt/yaml/EncryptRuleConfigurationYamlIT.java | 8 +++++++-
.../encrypt/core/src/test/resources/yaml/encrypt-rule.yaml | 1 +
features/mask/core/pom.xml | 10 +++++-----
4 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/features/encrypt/core/pom.xml b/features/encrypt/core/pom.xml
index 9894063284b..8904d2683b0 100644
--- a/features/encrypt/core/pom.xml
+++ b/features/encrypt/core/pom.xml
@@ -56,6 +56,12 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-it-yaml</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-single-core</artifactId>
@@ -67,11 +73,5 @@
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-it-yaml</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/EncryptRuleConfigurationYamlIT.java b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/EncryptRuleConfigurationYamlIT.java
index ac2e959c62b..c8725e5fe5d 100644
--- a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/EncryptRuleConfigurationYamlIT.java
+++ b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/EncryptRuleConfigurationYamlIT.java
@@ -40,6 +40,7 @@ class EncryptRuleConfigurationYamlIT extends YamlRuleConfigurationIT {
assertColumns(actual);
assertQueryColumn(actual);
assertEncryptAlgorithm(actual);
+ assertLikeEncryptAlgorithm(actual);
}
private void assertColumns(final YamlEncryptRuleConfiguration actual) {
@@ -59,8 +60,13 @@ class EncryptRuleConfigurationYamlIT extends YamlRuleConfigurationIT {
}
private void assertEncryptAlgorithm(final YamlEncryptRuleConfiguration actual) {
- assertThat(actual.getEncryptors().size(), is(3));
+ assertThat(actual.getEncryptors().size(), is(2));
assertThat(actual.getEncryptors().get("username_encryptor").getType(), is("AES"));
assertThat(actual.getEncryptors().get("username_encryptor").getProps().get("aes-key-value"), is("123456abc"));
}
+
+ private void assertLikeEncryptAlgorithm(final YamlEncryptRuleConfiguration actual) {
+ assertThat(actual.getLikeEncryptors().size(), is(1));
+ assertThat(actual.getLikeEncryptors().get("like_encryptor").getType(), is("CHAR_DIGEST_LIKE"));
+ }
}
diff --git a/features/encrypt/core/src/test/resources/yaml/encrypt-rule.yaml b/features/encrypt/core/src/test/resources/yaml/encrypt-rule.yaml
index 9be5e3a1753..d1e71c14256 100644
--- a/features/encrypt/core/src/test/resources/yaml/encrypt-rule.yaml
+++ b/features/encrypt/core/src/test/resources/yaml/encrypt-rule.yaml
@@ -38,5 +38,6 @@ rules:
type: AES
props:
aes-key-value: 123456abc
+ likeEncryptors:
like_encryptor:
type: CHAR_DIGEST_LIKE
diff --git a/features/mask/core/pom.xml b/features/mask/core/pom.xml
index 08345e1e65d..f863a2f057f 100644
--- a/features/mask/core/pom.xml
+++ b/features/mask/core/pom.xml
@@ -45,16 +45,16 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
-
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-it-yaml</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
</dependencies>
</project>