Search in sources :

Example 1 with AntBuildStep

use of org.jenkinsci.test.acceptance.plugins.ant.AntBuildStep in project acceptance-test-harness by jenkinsci.

the class AntPluginTest method locallyInstalledAnt.

@Test
@Native("ant")
public void locallyInstalledAnt() {
    AntInstallation ant = ToolInstallation.addTool(jenkins, AntInstallation.class);
    ant.name.set("native_ant");
    String antHome = ant.useNative();
    ant.getPage().save();
    job.configure();
    job.copyResource(resource("ant/echo-helloworld.xml"), "build.xml");
    AntBuildStep step = job.addBuildStep(AntBuildStep.class);
    step.antName.select("native_ant");
    step.targets.set("-version");
    job.save();
    String expectedVersion = localAntVersion(antHome);
    job.startBuild().shouldSucceed().shouldContainsConsoleOutput(Pattern.quote(expectedVersion));
}
Also used : AntBuildStep(org.jenkinsci.test.acceptance.plugins.ant.AntBuildStep) AntInstallation(org.jenkinsci.test.acceptance.plugins.ant.AntInstallation) Native(org.jenkinsci.test.acceptance.junit.Native) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Aggregations

AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 Native (org.jenkinsci.test.acceptance.junit.Native)1 AntBuildStep (org.jenkinsci.test.acceptance.plugins.ant.AntBuildStep)1 AntInstallation (org.jenkinsci.test.acceptance.plugins.ant.AntInstallation)1 Test (org.junit.Test)1