Package hudson.cli

Examples of hudson.cli.CLI.execute()


    }

    private int command(String... args) throws Exception {
        CLI cli = new CLI(getURL());
        try {
            return cli.execute(args);
        } finally {
            cli.close();
        }
    }
View Full Code Here


    public void testNodeOfflineCli() throws Exception {
        DumbSlave s = createSlave();

        CLI cli = new CLI(getURL());
        try {
            assertTrue(cli.execute("wait-node-offline","xxx")!=0);
            assertTrue(cli.execute("wait-node-online",s.getNodeName())==0);

            s.toComputer().disconnect().get();

            assertTrue(cli.execute("wait-node-offline",s.getNodeName())==0);
View Full Code Here

        DumbSlave s = createSlave();

        CLI cli = new CLI(getURL());
        try {
            assertTrue(cli.execute("wait-node-offline","xxx")!=0);
            assertTrue(cli.execute("wait-node-online",s.getNodeName())==0);

            s.toComputer().disconnect().get();

            assertTrue(cli.execute("wait-node-offline",s.getNodeName())==0);
        } finally {
View Full Code Here

            assertTrue(cli.execute("wait-node-offline","xxx")!=0);
            assertTrue(cli.execute("wait-node-online",s.getNodeName())==0);

            s.toComputer().disconnect().get();

            assertTrue(cli.execute("wait-node-offline",s.getNodeName())==0);
        } finally {
            cli.close();
        }
    }
}
View Full Code Here

    public void testOnCreatedViaCLI() throws Exception {
        ByteArrayOutputStream buf = new ByteArrayOutputStream();
        PrintStream out = new PrintStream(buf);
        CLI cli = new CLI(getURL());
        try {
            cli.execute(Arrays.asList("create-job", "testJob"),
                    new ByteArrayInputStream(("<project><actions/><builders/><publishers/>"
                            + "<buildWrappers/></project>").getBytes()),
                    out, out);
            out.flush();
            assertNotNull("job should be created: " + buf, hudson.getItem("testJob"));
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.