This is an automated email from the ASF dual-hosted git repository. liyang pushed a commit to branch sync in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 190f466b109f1e229e4a6c2f725469511c66bbcd Author: tttMelody <245915...@qq.com> AuthorDate: Mon Mar 26 13:06:32 2018 +0800 minor, add null case. --- .../test/java/org/apache/kylin/rest/util/AclUtilTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/src/test/java/org/apache/kylin/rest/util/AclUtilTest.java b/server/src/test/java/org/apache/kylin/rest/util/AclUtilTest.java index 18e5bf5..217abe8 100644 --- a/server/src/test/java/org/apache/kylin/rest/util/AclUtilTest.java +++ b/server/src/test/java/org/apache/kylin/rest/util/AclUtilTest.java @@ -42,6 +42,18 @@ public class AclUtilTest extends ServiceTestBase { AclUtil aclUtil; @Test + public void testNull() { + // ADMIN will go into hasRole first. + swichUser("ANALYST", Constant.ROLE_ANALYST); + try { + aclUtil.hasProjectAdminPermission(null); + Assert.fail("expecting some AlreadyExistsException here"); + } catch (Exception e) { + Assert.assertEquals("Access is denied", e.getMessage()); + } + } + + @Test public void testBasic() throws IOException { final String PROJECT = "default"; final String ANALYST = "ANALYST"; -- To stop receiving notification emails like this one, please contact liy...@apache.org.