Skip to content
Browse files

[JENKINS-34758] Test for SECURITY-170

  • Loading branch information
amuniz committed May 19, 2016
1 parent bac2693 commit d3478a4e052c2385f3b3a32953cfa5f22eb187ce
Showing with 19 additions and 0 deletions.
  1. +19 −0 src/test/java/hudson/matrix/
@@ -70,6 +70,7 @@
import hudson.model.ParametersAction;
import hudson.model.FileParameterValue;
import hudson.model.StringParameterDefinition;
import hudson.model.StringParameterValue;

import java.util.List;
import java.util.ArrayList;
@@ -412,6 +413,24 @@ public void testTwoFileParams() throws Exception {

public void testParametersAsEnvOnChildren() throws Exception {
MatrixProject p = createMatrixProject();
p.setAxes(new AxisList(new TextAxis("foo","1")));
p.addProperty(new ParametersDefinitionProperty(
new StringParameterDefinition("MY_PARAM","")
// must fail if $MY_PARAM or $foo are not defined in children
p.getBuildersList().add(new Shell("set -eux; echo $MY_PARAM; echo $foo"));

List<ParameterValue> params = new ArrayList<ParameterValue>();
params.add(new StringParameterValue("MY_PARAM", "value1"));

QueueTaskFuture<MatrixBuild> f = p.scheduleBuild2(0, new LegacyCodeCause(), new ParametersAction(params));

* Verifies that the concurrent build feature works, and makes sure
* that each gets its own unique workspace.

0 comments on commit d3478a4

Please sign in to comment.