Skip to content

Commit

Permalink
Merge pull request #27 from raul-arabaolaza/JENKINS-44185
Browse files Browse the repository at this point in the history
[JENKINS-44185] Unit tests failling on recent versions of jenkins core due to SECURITY-170
  • Loading branch information
armfergom committed May 10, 2017
2 parents ddd75a8 + f0f409e commit 67dc9a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/hudson/tasks/AntTest.java
Expand Up @@ -35,6 +35,7 @@
import hudson.model.Cause;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.ParameterDefinition;
import hudson.model.ParametersAction;
import hudson.model.ParametersDefinitionProperty;
import hudson.model.PasswordParameterDefinition;
Expand Down Expand Up @@ -347,6 +348,11 @@ public void propertyReplacedByEmptyBuildParameter() throws Exception {
private void testVariableReplaced(String variableValue) throws Exception {
FreeStyleProject project = createSimpleAntProject("", null, "build-properties.xml", "testProperty=$variable");

//SECURITY-170
ParameterDefinition paramDef = new StringParameterDefinition("variable", "");
ParametersDefinitionProperty paramsDef = new ParametersDefinitionProperty(paramDef);
project.addProperty(paramsDef);

FreeStyleBuild build = project.scheduleBuild2(0, new Cause.UserIdCause(),
new ParametersAction(new StringParameterValue("variable", variableValue))).get();

Expand Down

0 comments on commit 67dc9a1

Please sign in to comment.