Examples of RunResponse


Examples of com.heroku.api.request.run.RunResponse

    @Test(dataProvider = "app", retryAnalyzer = InternalServerErrorAnalyzer.class)
    public void testProcessCommand(App app) {
        Proc proc = null;
        try {
            final RunResponse runResponse = connection.execute(new Run(app.getName(), "sleep 60", false), apiKey);
            proc = runResponse.getProc();

            List<Proc> response = connection.execute(new ProcessList(app.getName()), apiKey);
            assertEquals(response.size(), 1);
            assertEquals(response.get(0).getProcess(), proc.getProcess());
            assertEquals(response.get(0).getCommand(), proc.getCommand());
View Full Code Here

Examples of com.heroku.api.request.run.RunResponse

    @Test(dataProvider = "app", retryAnalyzer = InternalServerErrorAnalyzer.class)
    public void testRunCommand(App app) throws IOException {
        Run run = new Run(app.getName(), "echo helloworld");
        Run runAttached = new Run(app.getName(), "echo helloworld", true);
        RunResponse response = connection.execute(run, apiKey);
        try {
            response.attach();
            fail("Should throw an illegal state exception");
        } catch (IllegalStateException ex) {
            //ok
        }
        RunResponse responseAttach = connection.execute(runAttached, apiKey);
        String output = HttpUtil.getUTF8String(HttpUtil.getBytes(responseAttach.attach()));
        System.out.println("RUN OUTPUT:" + output);
        assertTrue(output.contains("helloworld"));
    }
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.