Skip to content

Commit

Permalink
[JENKINS-47064] Verify fix for BooleanClosureWrapper
Browse files Browse the repository at this point in the history
Also bumps parent POM for Intellij.
  • Loading branch information
abayer committed Sep 22, 2017
1 parent a5dea90 commit fd283fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.33</version>
<version>2.35</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down Expand Up @@ -67,7 +67,7 @@
<git-plugin.version>3.1.0</git-plugin.version>
<workflow-support-plugin.version>2.14</workflow-support-plugin.version>
<scm-api-plugin.version>2.0.8</scm-api-plugin.version>
<groovy-cps.version>1.19</groovy-cps.version>
<groovy-cps.version>1.20-20170922.203635-3</groovy-cps.version> <!-- TODO: Replace with release once https://github.com/cloudbees/groovy-cps/pull/75 is merged and released -->
</properties>
<dependencies>
<dependency>
Expand Down
Expand Up @@ -277,4 +277,12 @@ public void rhsOfDeclarationSandboxedInCPS() throws Exception {
jenkins.assertBuildStatus(Result.FAILURE, b);
jenkins.assertLogContains("org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance", b);
}

@Issue("JENKINS-47064")
@Test
public void booleanClosureWrapperFromDGM() throws Exception {
WorkflowJob job = jenkins.jenkins.createProject(WorkflowJob.class, "p");
job.setDefinition(new CpsFlowDefinition("['a', 'b'].every { sleep 1; return it != null }\n", true));
jenkins.buildAndAssertSuccess(job);
}
}

0 comments on commit fd283fb

Please sign in to comment.