You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2018/04/03 06:50:42 UTC
[kylin] 04/10: minor, add null case.
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 d8745c318cc54ce2540f864db50d38ec14e1487c
Author: tttMelody <24...@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
liyang@apache.org.