Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.SecurityManagerSetup


                                 "client or server is missing");
        }
        TestSuite suite = new TestSuite();
        addVersionCombinations(suite);
        TestConfiguration config = TestConfiguration.getCurrent();
        return new SecurityManagerSetup(
                new ServerSetup(suite, "localhost", config.getPort()),
                // Need permission for getProtectionDomain to determine what
                // to put on the classpath for the spawned process(es).
                VersionCombinationConfigurator.class.getName().
                    replaceAll("\\.", "/") + ".policy",
View Full Code Here


                TestConfiguration.orderedSuite(
                        NetworkServerControlApiTest.class));
        //
        // Install a security manager using the initial policy file.
        //
        test = new SecurityManagerSetup( test,serverPolicyName );
       
       
        //
        // Copy over the policy file we want to use.
        //
View Full Code Here

    public ShutdownWithoutDeregisterPermissionTest(String name) {
        super(name);
    }

    public static Test suite() {
        return new SecurityManagerSetup(
                TestConfiguration.embeddedSuite(
                        ShutdownWithoutDeregisterPermissionTest.class),
                "org/apache/derbyTesting/functionTests/tests/engine/" +
                "noDeregisterPermission.policy");
    }
View Full Code Here

        // the network server.
        if (Derby.hasServer()) {
            suite.addTest(new derbyrunjartest("xtestServer"));
        }

        return new SecurityManagerSetup(
                suite,
                cl.getName().replace('.', '/') + ".policy",
                true);
    }
View Full Code Here

    private static Test decorateWithPolicy(Test test) {
        String serverPolicyName = new ServerPropertiesTest("test").makeServerPolicyName();
        //
        // Install a security manager using the initial policy file.
        //
        test = new SecurityManagerSetup(test,serverPolicyName );
        // Copy over the policy file we want to use.
        //
        test = new SupportFilesSetup(
            test, null, new String[] {POLICY_FILE_NAME},
            null, new String[] {TARGET_POLICY_FILE_NAME}
View Full Code Here

         * The output would change whether the test was being ran for the first
         * or subsequent times. */
        test = TestConfiguration.singleUseDatabaseDecorator(test);
        test = new LocaleTestSetup(test, serverLocale);
        // Install a security manager using the initial policy file.
        test = new SecurityManagerSetup(test, policyName);

        // Copy over the policy file we want to use.
        test = new SupportFilesSetup
            (
             test,
View Full Code Here

        }
        Class klass = Derby5937SlaveShutdownTest.class;
        // The default security policy doesn't allow derby.jar to do
        // networking, which is needed for replication, so install a custom
        // policy for this test.
        return new SecurityManagerSetup(
            TestConfiguration.singleUseDatabaseDecorator(
                TestConfiguration.embeddedSuite(klass), MASTER_DB),
            klass.getName().replace('.', '/') + ".policy", true);
    }
View Full Code Here

    private static Test decorateWithPolicy(Test test) {
        String serverPolicyName = new ServerPropertiesTest("test").makeServerPolicyName();
        //
        // Install a security manager using the initial policy file.
        //
        test = new SecurityManagerSetup(test,serverPolicyName );
        // Copy over the policy file we want to use.
        //
        test = new SupportFilesSetup(
            test, null, new String[] {POLICY_FILE_NAME},
            null, new String[] {TARGET_POLICY_FILE_NAME}
View Full Code Here

    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 );
View Full Code Here

    private static Test decorateWithPolicy(Test test) {
        String serverPolicyName = new ServerPropertiesTest("test").makeServerPolicyName();
        //
        // Install a security manager using the initial policy file.
        //
        test = new SecurityManagerSetup(test,serverPolicyName );
        // Copy over the policy file we want to use.
        //
        test = new SupportFilesSetup(
            test, null, new String[] {POLICY_FILE_NAME},
            null, new String[] {TARGET_POLICY_FILE_NAME}
View Full Code Here

TOP

Related Classes of org.apache.derbyTesting.junit.SecurityManagerSetup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.