Skip to content
Permalink
Browse files

[JENKINS-34599] Demonstrating that fix also works in CPS mode.

  • Loading branch information...
jglick committed Jul 13, 2017
1 parent b476ea4 commit f9ddb9279fe0a2f94a832837cd226f9974d7a684
Showing with 8 additions and 1 deletion.
  1. +1 −1 pom.xml
  2. +7 −0 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.29</version>
<version>1.30-20170713.204356-2</version> <!-- TODO https://github.com/jenkinsci/script-security-plugin/pull/132 -->
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
@@ -77,6 +77,13 @@
jenkins.configRoundtrip(job);
}

@Issue("JENKINS-34599")
@Test public void finalFields() 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));
}

@Test
public void sandboxInvokerUsed() throws Exception {
WorkflowJob job = jenkins.jenkins.createProject(WorkflowJob.class, "p");

0 comments on commit f9ddb92

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