Jesse Glick commented on Bug JENKINS-13536

Have not figured out how to reproduce in a functional test. Starting with

ParametersDefinitionProperty pdp = new ParametersDef
FreeStyleProject p = j.createFreeStyleProject();
p.addProperty(pdp);
p.save();
File f = new File(j.createTmpDir(), "stuff");
FileUtils.writeStringToFile(f, "some stuff here\n");

it is not clear how to proceed.

p.scheduleBuild2(0, null, new ParametersAction(new FileParameterValue("stuff", f, "stuff")));

is the obvious approach but this would be using FileParameterValue.FileItemImpl which bypasses the actual bug.

Using HtmlUnit (WebRequestSettings, HtmlPage, HtmlForm, HtmlFileInput) would closely follow the user workflow but loading the initial form fails due to crumb issues.

curl -F file=@/tmp/… -Fjson='{"parameter": {"name": "file", "file": "file"}}' 'http://localhost:8080/job/…/build?delay=0sec'

works from the command line but HttpUnit is not currently available in jenkins/test so there is no apparent way to directly simulate this.

For now will just have to verify fix manually.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to