Package jenkins.util

Examples of jenkins.util.VirtualFile.open()


        // get the build going, and wait until workflow pauses
        WorkflowRun b = j.assertBuildStatusSuccess(foo.scheduleBuild2(0).get());

        VirtualFile archivedFile = b.getArtifactManager().root().child("msg.out");
        assertTrue(archivedFile.exists());
        assertEquals("hello world\n",IOUtils.toString(archivedFile.open()));
    }

    @Test public void unarchiveDir() throws Exception {
        WorkflowJob p = j.jenkins.createProject(WorkflowJob.class, "p");
        p.setDefinition(new CpsFlowDefinition(StringUtils.join(Arrays.asList(
View Full Code Here


                "  sh 'cat a/1 a/b/2'",
                "}"), "\n")));
        WorkflowRun b = j.assertBuildStatusSuccess(p.scheduleBuild2(0).get());
        VirtualFile archivedFile = b.getArtifactManager().root().child("a/b/2");
        assertTrue(archivedFile.exists());
        assertEquals("two\n", IOUtils.toString(archivedFile.open()));
        j.assertLogContains("one\ntwo", b);
    }

}
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.