From 8ba4f8ae062e07bd2c3429a583a96c8a775452a5 Mon Sep 17 00:00:00 2001 From: zhangjidi Date: Mon, 30 Sep 2019 09:13:26 +0800 Subject: [PATCH] GetAccessConfigSubCommand for ACL configuration (#1263) --- .../rocketmq/acl/plain/PlainAccessValidatorTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/acl/src/test/java/org/apache/rocketmq/acl/plain/PlainAccessValidatorTest.java b/acl/src/test/java/org/apache/rocketmq/acl/plain/PlainAccessValidatorTest.java index bca90756..00b86228 100644 --- a/acl/src/test/java/org/apache/rocketmq/acl/plain/PlainAccessValidatorTest.java +++ b/acl/src/test/java/org/apache/rocketmq/acl/plain/PlainAccessValidatorTest.java @@ -29,6 +29,7 @@ import org.apache.rocketmq.acl.common.AclConstants; import org.apache.rocketmq.acl.common.AclException; import org.apache.rocketmq.acl.common.AclUtils; import org.apache.rocketmq.acl.common.SessionCredentials; +import org.apache.rocketmq.common.AclConfig; import org.apache.rocketmq.common.PlainAccessConfig; import org.apache.rocketmq.common.protocol.RequestCode; import org.apache.rocketmq.common.protocol.header.*; @@ -561,4 +562,12 @@ public class PlainAccessValidatorTest { AclUtils.writeDataObject(targetFileName, backUpAclConfigMap); } + @Test + public void getAllAclConfigTest(){ + PlainAccessValidator plainAccessValidator = new PlainAccessValidator(); + AclConfig aclConfig = plainAccessValidator.getAllAclConfig(); + Assert.assertEquals(aclConfig.getGlobalWhiteAddrs().size(), 2); + Assert.assertEquals(aclConfig.getPlainAccessConfigs().size(), 2); + } + } -- GitLab