use of org.apache.derbyTesting.junit.SecurityManagerSetup 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.SecurityManagerSetup in project derby by apache.
the class LuceneBackupTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(LuceneBackupTest.class);
Test secureTest = new SecurityManagerSetup(suite, POLICY_FILE);
Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication(secureTest, LEGAL_USERS, "LuceneBackupPermissions");
Test authorizedTest = TestConfiguration.sqlAuthorizationDecoratorSingleUse(authenticatedTest, DB_NAME, true);
Test supportFilesTest = new SupportFilesSetup(authorizedTest);
return supportFilesTest;
}
use of org.apache.derbyTesting.junit.SecurityManagerSetup in project derby by apache.
the class LuceneJarLoadingTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(LuceneJarLoadingTest.class);
Test secureTest = new SecurityManagerSetup(suite, POLICY_FILE);
Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication(secureTest, LEGAL_USERS, "LuceneJarLoadingPermissions");
Test authorizedTest = TestConfiguration.sqlAuthorizationDecoratorSingleUse(authenticatedTest, DB_NAME, true);
Test supportFilesTest = new SupportFilesSetup(authorizedTest, SUPPORT_FILES);
return supportFilesTest;
}
use of org.apache.derbyTesting.junit.SecurityManagerSetup in project derby by apache.
the class LuceneSupportPermsTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
String luceneVersion = getSystemProperty(LUCENE_VERSION_PROPERTY);
if (luceneVersion != null) {
LUCENE_VERSION = luceneVersion;
}
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(LuceneSupportPermsTest.class);
Test secureTest = new SecurityManagerSetup(suite, POLICY_FILE);
Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication(secureTest, LEGAL_USERS, "LuceneSupportPermissions");
Test authorizedTest = TestConfiguration.sqlAuthorizationDecoratorSingleUse(authenticatedTest, DB_NAME, true);
Test localizedTest = new LocaleTestSetup(authorizedTest, new Locale(LANGUAGE, COUNTRY));
return localizedTest;
}
use of org.apache.derbyTesting.junit.SecurityManagerSetup in project derby by apache.
the class Derby3980DeadlockTest method decorateTest.
/**
* Decorate a test with SecurityManagerSetup, clientServersuite, and
* SupportFilesSetup.
*
* @return the decorated test
*/
private static Test decorateTest() {
Test test = TestConfiguration.clientServerSuite(Derby3980DeadlockTest.class);
Properties diagProperties = new Properties();
diagProperties.setProperty("derby.stream.error.extendedDiagSeverityLevel", "30000");
diagProperties.setProperty("derby.infolog.append", "true");
test = new SystemPropertyTestSetup(test, diagProperties, true);
// Install a security manager using the initial policy file.
return new SecurityManagerSetup(test, POLICY_FILE_NAME);
}
Aggregations