db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From banda...@apache.org
Subject svn commit: r388629 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevoke.java
Date Fri, 24 Mar 2006 20:40:17 GMT
Author: bandaram
Date: Fri Mar 24 12:40:15 2006
New Revision: 388629

URL: http://svn.apache.org/viewcvs?rev=388629&view=rev
Log:
Enable Metadata tests to test columnPrivileges and tablePrivileges as part of grantRevoke
test. Was previously disabled, pending code changes.

Also removed testing of defaultConnectionMode property, since this is not the way to set sqlAuthorization.

Submitted by Satheesh Bandaram (satheesh@sourcery.org)

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevoke.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevoke.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevoke.java?rev=388629&r1=388628&r2=388629&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevoke.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevoke.java
Fri Mar 24 12:40:15 2006
@@ -61,10 +61,6 @@
             ij.getPropertyArg(args);
             owner.setConnection( ij.startJBMS());
             dbmd = owner.getConnection().getMetaData();
-// GrantRevoke TODO: Enable standard access tests
-// checkStandardAccess( );
-//            owner.stmt.executeUpdate( "call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.sqlAuthorization',"
-//                                      + " 'true')");
 
             runGrantTests();
             // We can't test much of REVOKE unless GRANT works
@@ -88,29 +84,6 @@
         System.exit( 0);
 	} // end of doIt
 
-    private void checkStandardAccess( ) throws SQLException
-    {
-        // Check that grant and revoke are not allowed in a legacy access mode.
-        System.out.println( "Try GRANT/REVOKE with legacy (non-standard) access permission.");
-        testErrors( legacyAccessErrors);
-        for( int i = 0; i < accessPropValues.length; i++)
-        {
-            owner.stmt.executeUpdate( "call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" +
-                                      " 'derby.database.defaultConnectionMode'," +
-                                      " '" + accessPropValues[i] + "')");
-            testErrors( legacyAccessErrors);
-        }
-    } // end of checkStandardAccess
-
-    private static final String[] accessPropValues = { "noAccess", "readOnlyAccess", "fullAccess"};
-    private static final String[][]legacyAccessErrors =
-    {
-        {"grant select on t1 to public", "42Z60",
-         "GRANT not allowed unless database property derby.database.defaultConnectionMode
has value 'sqlStandard'."},
-        {"revoke on t1 from public", "42Z60",
-         "REVOKE not allowed unless database property derby.database.defaultConnectionMode
has value 'sqlStandard'."}
-    };
-
     private void runGrantTests( ) throws SQLException
     {
         setup( grantTestSetupSQL);
@@ -828,22 +801,12 @@
         
     private void reportFailure( String msg)
     {
-	// GrantRevoke TODO: Need to implement metadata correctly. For now, ignore errors
-	// caused by metadata.
-	if (msg.startsWith("DatabaseMetaData"))
-		return;
-
         errorCount++;
         System.out.println( msg);
     }
         
     private void reportFailure( String[] msg)
     {
-	// GrantRevoke TODO: Need to implement metadata correctly. For now, ignore errors
-	// caused by metadata.
-	if (msg[0].startsWith("DatabaseMetaData"))
-		return;
-
         errorCount++;
         for( int i = 0; i < msg.length; i++)
             System.out.println( msg[i]);



Mime
View raw message