Added another attribute 'checkDependsOn' on <input> elements (akin to
'fillDependsOn', etc) to list up the other dependency controls, and
insert appropriate onchange events.
'checkUrl' is now just the stem portion of the URL to invoke, and
the client script builds up the query parameters.
Also cleaning up variable names to be less misleading.
Note that new File("target") is really a bad idea since we cannot predict the CWD in effect when Maven is run.
(From the standard bin/mvn launcher, it seems that it will always be *some* Maven project at least.
This may not be true for Maven run embedded from various tools.)
But leaving that as is for now, since it is not clear how else we would find the project location.
(new File(env.description().getTestClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParentFile() might work but it is pretty hacky.)
Added a listener that gets called at the end of the test to provide opportunity for a cleanup.
This avoids the code duplication between HudsonTestCase vs JenkinsRule, too.
https://ci.jenkins-ci.org/job/jenkins_main_trunk/2602/testReport/junit/hudson.model/JobTest/readPermission/
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 404 Not Found for http://localhost:47898/jenkins//j_acegi_security_check
at com.gargoylesoftware.htmlunit.WebClient.throwFailingHttpStatusCodeExceptionIfNecessary(WebClient.java:549)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:333)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:357)
at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:196)
at org.jvnet.hudson.test.JenkinsRule$WebClient.login(JenkinsRule.java:1776)
at org.jvnet.hudson.test.JenkinsRule$WebClient.login(JenkinsRule.java:1788)
at hudson.model.JobTest.readPermission(JobTest.java:182)
Copying every time causes overwriting files in the webapp directory, and often causes errors in Windows.
This reverts JENKINS-12647(commit 7ae303f881).
Expanded MockFolder to be a ViewGroup so that it is possible to test views inside folders,
and generally fixed it to service Stapler hierarchies properly so that WebClient-based tests can work.
Otherwise your disk will fill up with (large) /tmp/hudson*tmp/ dirs when running plugin tests.
(Would have been better to use e.g. TemporaryFolder, but that would require incompatible changes to the test harness.)
To reproduce SUREFIRE-974 prior to this fix, pick an arbitrary group class to (not) exclude:
mvn -f test/pom.xml -Dtest=CoreJellyTest -DexcludedGroups=hudson.ExtensionPoint test
- My second patch, with whitelisted XPath values and forbidden JSONP.
- Disabling JSONP altogether for REST API (unless explicitly allowed).
- Forbid primitive XPath result sets by default.
- Refuse to serve _crumb=123456 as this could (very hypothetically) be exploited.
(cherry picked from commit f4af9b1ab4)
Conflicts:
core/src/main/java/hudson/model/Api.java