Skip to content
Permalink
Browse files

Picking up script-security 1.30 release, and demonstrating fix of JEN…

…KINS-45629.
  • Loading branch information...
jglick committed Jul 25, 2017
1 parent f9ddb92 commit 9751df6154df9e10aeb965efb218cbb31c1f2ee7
Showing with 5 additions and 3 deletions.
  1. +1 −1 pom.xml
  2. +4 −2 src/test/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition2Test.java
@@ -93,7 +93,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.30-20170713.204356-2</version> <!-- TODO https://github.com/jenkinsci/script-security-plugin/pull/132 -->
<version>1.30</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
@@ -77,11 +77,13 @@
jenkins.configRoundtrip(job);
}

@Issue("JENKINS-34599")
@Test public void finalFields() throws Exception {
@Issue({"JENKINS-34599", "JENKINS-45629"})
@Test public void fieldInitializers() throws Exception {
WorkflowJob p = jenkins.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("class X {final String val; X(String _val) {val = _val}}; echo(/hello ${new X('world').val}/)", true));
jenkins.assertLogContains("hello world", jenkins.buildAndAssertSuccess(p));
p.setDefinition(new CpsFlowDefinition("class X {String world = 'world'; String message = 'hello ' + world}; echo(new X().message)", true));
jenkins.assertLogContains("hello world", jenkins.buildAndAssertSuccess(p));
}

@Test

0 comments on commit 9751df6

Please sign in to comment.
You can’t perform that action at this time.