@Test public void testCaseSensitiveGroupName() throws Exception { runTestAsSubject(new TestOperation() { @Override public void runTestAsSubject() throws Exception { client.createRole(requestorName, TEST_ROLE_NAME_1, HBASE_INDEXER); String[] args = { "-arg", "-r", TEST_ROLE_NAME_1, "-g", "group1", "-conf", confPath.getAbsolutePath() }; SentryShellIndexer.main(args); args = new String[] { "-lr", "-g", "group1", "-conf", confPath.getAbsolutePath() }; SentryShellIndexer sentryShell = new SentryShellIndexer(); Set<String> roleNames = getShellResultWithOSRedirect(sentryShell, args, true); validateRoleNames(roleNames, TEST_ROLE_NAME_1); args = new String[] { "-lr", "-g", "GROUP1", "-conf", confPath.getAbsolutePath() }; roleNames = getShellResultWithOSRedirect(sentryShell, args, true); validateRoleNames(roleNames); } }); }
public static void main(String[] args) throws Exception { SentryShellIndexer sentryShell = new SentryShellIndexer(); try { sentryShell.executeShell(args); } catch (Exception e) { LOGGER.error(e.getMessage(), e); Throwable current = e; while (current != null && current.getMessage() == null) { current = current.getCause(); } System.out.println("The operation failed." + (current.getMessage() == null ? "" : " Message: " + current.getMessage())); System.exit(1); } }
SentryShellIndexer extends SentryShellGeneric { public static void main(String[] args) throws Exception { SentryShellIndexer sentryShell = new SentryShellIndexer(); try { sentryShell.executeShell(args); } catch (Exception e) { LOGGER.error(e.getMessage(), e); Throwable current = e; while (current != null && current.getMessage() == null) { current = current.getCause(); } System.out.println("The operation failed." + (current.getMessage() == null ? "" : " Message: " + current.getMessage())); System.exit(1); } } }
SentryShellIndexer extends SentryShellGeneric { public static void main(String[] args) throws Exception { SentryShellIndexer sentryShell = new SentryShellIndexer(); try { sentryShell.executeShell(args); } catch (Exception e) { LOGGER.error(e.getMessage(), e); Throwable current = e; while (current != null && current.getMessage() == null) { current = current.getCause(); } System.out.println("The operation failed." + (current.getMessage() == null ? "" : " Message: " + current.getMessage())); System.exit(1); } }  }
SentryShellIndexer extends SentryShellGeneric { public static void main(String[] args) throws Exception { SentryShellIndexer sentryShell = new SentryShellIndexer(); try { sentryShell.executeShell(args); } catch (Exception e) { LOGGER.error(e.getMessage(), e); Throwable current = e; while (current != null && current.getMessage() == null) { current = current.getCause(); } System.out.println("The operation failed." + (current.getMessage() == null ? "" : " Message: " + current.getMessage())); System.exit(1); } }  @Override void run(); static void main(String[] args); }
SentryShellIndexer extends SentryShellGeneric { public static void main(String[] args) throws Exception { SentryShellIndexer sentryShell = new SentryShellIndexer(); try { sentryShell.executeShell(args); } catch (Exception e) { LOGGER.error(e.getMessage(), e); Throwable current = e; while (current != null && current.getMessage() == null) { current = current.getCause(); } System.out.println("The operation failed." + (current.getMessage() == null ? "" : " Message: " + current.getMessage())); System.exit(1); } }  @Override void run(); static void main(String[] args);  }