Examples of SandBox


Examples of io.apigee.trireme.core.Sandbox

    @Test
    public void testSpawnBlocked()
        throws InterruptedException, ExecutionException, NodeException
    {
        NodeEnvironment localEnv = new NodeEnvironment();
        Sandbox sb = new Sandbox();
        sb.setSubprocessPolicy(new NoEchoPolicy());
        localEnv.setSandbox(sb);
        NodeScript script = localEnv.createScript("spawntest.js",
                                             new File("./target/test-classes/tests/spawntest.js"),
                                             new String[] { "fail" });
        ScriptStatus status = script.execute().get();
View Full Code Here

Examples of io.apigee.trireme.core.Sandbox

    @Test
    public void testChrootGlobalModule()
        throws InterruptedException, ExecutionException, NodeException
    {
        Sandbox sb = new Sandbox();
        sb.setFilesystemRoot("./target/test-classes");
        NodeScript script = env.createScript("globalmoduletest.js",
                                             new File("./target/test-classes/tests/globalmoduletest.js"), null);
        HashMap<String, String> env = new HashMap<String, String>();
        env.put("NODE_PATH", "./global");
        script.setEnvironment(env);
View Full Code Here

Examples of io.apigee.trireme.core.Sandbox

        if (Platform.get().isWindows()) {
            System.out.println("Mount is currently not supported on Windows");
            return;
        }

        Sandbox sb = new Sandbox();
        NodeScript script = env.createScript("globalmoduletest.js",
                                             new File("./target/test-classes/tests/globalmoduletest.js"), null);
        sb.mount("/usr/lib/node_modules", "./target/test-classes/global");
        HashMap<String, String> env = new HashMap<String, String>();
        env.put("NODE_PATH", "/usr/lib/node_modules");
        script.setEnvironment(env);
        script.setSandbox(sb);
View Full Code Here

Examples of io.apigee.trireme.core.Sandbox

        if (Platform.get().isWindows()) {
            System.out.println("Mount is currently not supported on Windows");
            return;
        }

        Sandbox sb = new Sandbox();
        sb.setFilesystemRoot("./target/test-classes");
        sb.mount("/node_modules", "./target/test-classes/global");
        NodeScript script = env.createScript("globalmoduletest.js",
                                             new File("./target/test-classes/tests/globalmoduletest.js"), null);
        HashMap<String, String> env = new HashMap<String, String>();
        // TODO we can't seem to do this for nested paths unless we have every subdirectory there.
        env.put("NODE_PATH", "/node_modules");
View Full Code Here

Examples of org.adoptopenjdk.jitwatch.sandbox.Sandbox

    config.switchToSandbox();

    setupVMLanguages();

    sandbox = new Sandbox(parser, this, this);

    setTitle("JITWatch Sandbox");

    splitEditorPanes = new SplitPane();
    splitEditorPanes.setOrientation(Orientation.HORIZONTAL);
View Full Code Here

Examples of org.apache.commons.jexl2.introspection.Sandbox

        Script script = JEXL.createScript(expr);
        Object result;
        result = script.execute(null);
        assertEquals("42", ((Foo) result).getName());

        Sandbox sandbox = new Sandbox();
        sandbox.black(Foo.class.getName()).execute("");
        Uberspect uber = new SandboxUberspectImpl(null, sandbox);
        JexlEngine sjexl = new JexlEngine(uber, null, null, null);
        sjexl.setStrict(true);

        script = sjexl.createScript(expr);
View Full Code Here

Examples of org.apache.maven.scm.provider.integrity.Sandbox

        ScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            File memberFile = new File( workingDirectory.getAbsoluteFile() + File.separator + filename );
            Response res = siSandbox.unlock( memberFile, filename );
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new ScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here

Examples of org.apache.maven.scm.provider.integrity.Sandbox

        getLogger().info( "Attempting to un-register sandbox in directory " + fileSet.getBasedir().getAbsolutePath() );
        RemoveScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.drop();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new RemoveScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here

Examples of org.apache.maven.scm.provider.integrity.Sandbox

            boolean success = ( exitCode == 0 ? true : false );
            result = new LoginScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );

            // Next we will prepare the Project and Sandbox for the other commands
            Project siProject = new Project( api, iRepo.getConfigruationPath() );
            Sandbox siSandbox = new Sandbox( api, siProject, fileSet.getBasedir().getAbsolutePath() );
            iRepo.setProject( siProject );
            iRepo.setSandbox( siSandbox );
        }
        catch ( APIException aex )
        {
View Full Code Here

Examples of org.apache.maven.scm.provider.integrity.Sandbox

        getLogger().info( "Attempting to revert members in sandbox " + fileSet.getBasedir().getAbsolutePath() );
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        UnEditScmResult result;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.revertMembers();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new UnEditScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.