Search in sources :

Example 1 with GroovyInstallation

use of org.jenkinsci.test.acceptance.plugins.groovy.GroovyInstallation in project acceptance-test-harness by jenkinsci.

the class GroovyPluginTest method use_native_groovy.

@Test
@Native("groovy")
public void use_native_groovy() {
    GroovyInstallation groovy = ToolInstallation.addTool(jenkins, GroovyInstallation.class);
    groovy.name.set("local-groovy");
    groovy.useNative();
    groovy.getPage().save();
    configureJob();
    final GroovyStep step = job.addBuildStep(GroovyStep.class);
    step.version.select("local-groovy");
    step.script("println 'version: ' + groovy.lang.GroovySystem.getVersion()");
    job.save();
    Build build = job.startBuild().shouldSucceed();
    String expectedVersion = localGroovyVersion();
    build.shouldContainsConsoleOutput("version: " + expectedVersion);
}
Also used : GroovyStep(org.jenkinsci.test.acceptance.plugins.groovy.GroovyStep) SystemGroovyStep(org.jenkinsci.test.acceptance.plugins.groovy.SystemGroovyStep) GroovyInstallation(org.jenkinsci.test.acceptance.plugins.groovy.GroovyInstallation) Build(org.jenkinsci.test.acceptance.po.Build) 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 GroovyInstallation (org.jenkinsci.test.acceptance.plugins.groovy.GroovyInstallation)1 GroovyStep (org.jenkinsci.test.acceptance.plugins.groovy.GroovyStep)1 SystemGroovyStep (org.jenkinsci.test.acceptance.plugins.groovy.SystemGroovyStep)1 Build (org.jenkinsci.test.acceptance.po.Build)1 Test (org.junit.Test)1