Skip to content

Commit

Permalink
minor, add null case.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaaaaaron authored and shaofengshi committed Apr 4, 2018
1 parent a6bfc9d commit febabc4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions server/src/test/java/org/apache/kylin/rest/util/AclUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ public class AclUtilTest extends ServiceTestBase {
@Autowired
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";
Expand Down

0 comments on commit febabc4

Please sign in to comment.