use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class NativeAuthenticationServiceTest method allConfigurations.
/**
* <p>
* Create a suite of all test configurations.
* </p>
*/
private static Test allConfigurations(boolean clientServer) throws Exception {
BaseTestSuite suite = new BaseTestSuite();
//
// No authentication.
//
suite.addTest((new NativeAuthenticationServiceTest(NONE, NO_AUTH, SYSTEM_WIDE, DONT_DISABLE_AUTH)).decorate(clientServer));
//
// NATIVE/LOCAL authentication with credentials in read/write dbs
//
suite.addTest((new NativeAuthenticationServiceTest(FILE, NATIVE, LOCAL, DISABLE_AUTHORIZATION)).decorate(clientServer));
suite.addTest((new NativeAuthenticationServiceTest(FILE, NATIVE, LOCAL, DONT_DISABLE_AUTH)).decorate(clientServer));
//
// NATIVE system-wide authentication with credentials in read/write dbs
//
suite.addTest((new NativeAuthenticationServiceTest(FILE, NATIVE, SYSTEM_WIDE, DISABLE_AUTHORIZATION)).decorate(clientServer));
suite.addTest((new NativeAuthenticationServiceTest(FILE, NATIVE, SYSTEM_WIDE, DONT_DISABLE_AUTH)).decorate(clientServer));
//
if (enableSubprotocolTests()) {
//
// NATIVE authentication with credentials in read-only databases accessed via jar subprotocol
//
suite.addTest((new NativeAuthenticationServiceTest(JAR, NATIVE, SYSTEM_WIDE, DONT_DISABLE_AUTH)).decorate(clientServer));
suite.addTest((new NativeAuthenticationServiceTest(JAR, NATIVE, LOCAL, DONT_DISABLE_AUTH)).decorate(clientServer));
//
// NATIVE authentication with credentials in read-only databases accessed via classpath subprotocol
//
suite.addTest((new NativeAuthenticationServiceTest(CLASSPATH, NATIVE, SYSTEM_WIDE, DONT_DISABLE_AUTH)).decorate(clientServer));
suite.addTest((new NativeAuthenticationServiceTest(CLASSPATH, NATIVE, LOCAL, DONT_DISABLE_AUTH)).decorate(clientServer));
}
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class NativeAuthenticationServiceTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() throws Exception {
BaseTestSuite suite = new BaseTestSuite();
//
if (enableSubprotocolTests()) {
suite.addTest((new NativeAuthenticationServiceTest(JAR_ENCRYPTED, NATIVE, LOCAL, DONT_DISABLE_AUTH)).decorate(false));
}
suite.addTest(allConfigurations(false));
if (!JDBC.vmSupportsJSR169()) {
suite.addTest(allConfigurations(true));
}
// should be OK to run in the local time zone.
return new TimeZoneTestSetup(suite, "GMT");
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class NoDBInternalsPermissionTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(NoDBInternalsPermissionTest.class);
Test secureTest = new SecurityManagerSetup(suite, POLICY_FILE);
return secureTest;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class NullIfTest method baseSuite.
public static Test baseSuite(String name) {
BaseTestSuite suite = new BaseTestSuite(name);
suite.addTestSuite(NullIfTest.class);
return new CleanDatabaseTestSetup(suite) {
/**
* Creates the table used in the test cases.
*/
protected void decorateSQL(Statement s) throws SQLException {
SQLUtilities.createAndPopulateAllDataTypesTable(s);
}
};
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class NullIfTest method suite.
/**
* Runs the test fixtures in embedded and client.
*
* @return test suite
*/
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("NullIfTest");
suite.addTest(baseSuite("NullIfTest:embedded"));
suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("NullIfTest:client")));
return suite;
}
Aggregations