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 2024/03/21 16:12:33 UTC
(shardingsphere) branch master updated: Refactor YamlMaskDataNodeRuleConfigurationSwapperTest (#30595)
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 c3807686924 Refactor YamlMaskDataNodeRuleConfigurationSwapperTest (#30595)
c3807686924 is described below
commit c380768692408b430b98c6dc396c31e41c532d7f
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Mar 22 00:12:26 2024 +0800
Refactor YamlMaskDataNodeRuleConfigurationSwapperTest (#30595)
---
.../yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java | 3 ++-
.../yaml/swapper/rule/YamlMaskColumnRuleConfigurationSwapperTest.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java
index 1dacb0371d9..fa0d974e79d 100644
--- a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java
+++ b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java
@@ -40,7 +40,8 @@ class YamlMaskDataNodeRuleConfigurationSwapperTest {
@Test
void assertSwapEmptyConfigurationToDataNodes() {
- assertTrue(new YamlMaskDataNodeRuleConfigurationSwapper().swapToDataNodes(new MaskRuleConfiguration(Collections.emptyList(), Collections.emptyMap())).isEmpty());
+ MaskRuleConfiguration config = new MaskRuleConfiguration(Collections.emptyList(), Collections.emptyMap());
+ assertThat(new YamlMaskDataNodeRuleConfigurationSwapper().swapToDataNodes(config).size(), is(0));
}
@Test
diff --git a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/rule/YamlMaskColumnRuleConfigurationSwapperTest.java b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/rule/YamlMaskColumnRuleConfigurationSwapperTest.java
index 34a46e75b13..8dd1526d94a 100644
--- a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/rule/YamlMaskColumnRuleConfigurationSwapperTest.java
+++ b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/rule/YamlMaskColumnRuleConfigurationSwapperTest.java
@@ -28,7 +28,8 @@ class YamlMaskColumnRuleConfigurationSwapperTest {
@Test
void assertSwapToYamlConfiguration() {
- YamlMaskColumnRuleConfiguration actual = new YamlMaskColumnRuleConfigurationSwapper().swapToYamlConfiguration(new MaskColumnRuleConfiguration("logicColumn", "md5_mask"));
+ MaskColumnRuleConfiguration encryptColumnRuleConfig = new MaskColumnRuleConfiguration("logicColumn", "md5_mask");
+ YamlMaskColumnRuleConfiguration actual = new YamlMaskColumnRuleConfigurationSwapper().swapToYamlConfiguration(encryptColumnRuleConfig);
assertThat(actual.getLogicColumn(), is("logicColumn"));
assertThat(actual.getMaskAlgorithm(), is("md5_mask"));
}