org.apache.hadoop.hive.ql.security
Class TestClientSideAuthorizationProvider

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.hadoop.hive.ql.security.TestClientSideAuthorizationProvider
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
TestStorageBasedClientSideAuthorizationProvider

public class TestClientSideAuthorizationProvider
extends junit.framework.TestCase

TestClientSideAuthorizationProvider : Simple base test for client side Authorization Providers. By default, tests DefaultHiveAuthorizationProvider


Field Summary
protected  HiveConf clientHiveConf
           
protected  Driver driver
           
protected  HiveMetaStoreClient msc
           
protected  UserGroupInformation ugi
           
 
Constructor Summary
TestClientSideAuthorizationProvider()
           
 
Method Summary
protected  void allowCreateInDb(String dbName, String userName, String location)
           
protected  void allowCreateInTbl(String tableName, String userName, String location)
           
protected  void allowDropOnDb(String dbName, String userName, String location)
           
protected  void allowDropOnTable(String tblName, String userName, String location)
           
protected  void assertNoPrivileges(CommandProcessorResponse ret)
           
protected  void disallowCreateInDb(String dbName, String userName, String location)
           
protected  void disallowCreateInTbl(String tableName, String userName, String location)
           
protected  String getAuthorizationProvider()
           
protected  String getTestDbName()
           
protected  String getTestTableName()
           
protected  void setUp()
           
protected  void tearDown()
           
 void testSimplePrivileges()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clientHiveConf

protected HiveConf clientHiveConf

msc

protected HiveMetaStoreClient msc

driver

protected Driver driver

ugi

protected UserGroupInformation ugi
Constructor Detail

TestClientSideAuthorizationProvider

public TestClientSideAuthorizationProvider()
Method Detail

getAuthorizationProvider

protected String getAuthorizationProvider()

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

getTestDbName

protected String getTestDbName()

getTestTableName

protected String getTestTableName()

testSimplePrivileges

public void testSimplePrivileges()
                          throws Exception
Throws:
Exception

allowCreateInTbl

protected void allowCreateInTbl(String tableName,
                                String userName,
                                String location)
                         throws Exception
Throws:
Exception

disallowCreateInTbl

protected void disallowCreateInTbl(String tableName,
                                   String userName,
                                   String location)
                            throws Exception
Throws:
Exception

allowCreateInDb

protected void allowCreateInDb(String dbName,
                               String userName,
                               String location)
                        throws Exception
Throws:
Exception

disallowCreateInDb

protected void disallowCreateInDb(String dbName,
                                  String userName,
                                  String location)
                           throws Exception
Throws:
Exception

allowDropOnTable

protected void allowDropOnTable(String tblName,
                                String userName,
                                String location)
                         throws Exception
Throws:
Exception

allowDropOnDb

protected void allowDropOnDb(String dbName,
                             String userName,
                             String location)
                      throws Exception
Throws:
Exception

assertNoPrivileges

protected void assertNoPrivileges(CommandProcessorResponse ret)


Copyright © 2012 The Apache Software Foundation