Skip to content

Commit

Permalink
[JENKINS-44185] Add explicit parameter definition to project
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-arabaolaza committed May 10, 2017
1 parent ddd75a8 commit 224eed9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/java/hudson/tasks/AntTest.java
Expand Up @@ -347,6 +347,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 224eed9

Please sign in to comment.