Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2726 from Vlatombe/JENKINS-41511
[JENKINS-41511] Don't try to set slaveAgentPort when it is enforced
- Loading branch information
Showing
2 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package jenkins.bugs; | ||
|
||
import org.junit.BeforeClass; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.jvnet.hudson.test.JenkinsRule; | ||
|
||
import hudson.security.HudsonPrivateSecurityRealm; | ||
import jenkins.model.Jenkins; | ||
|
||
public class Jenkins41511Test { | ||
|
||
@BeforeClass | ||
public static void setUpClass() { | ||
System.setProperty(Jenkins.class.getName()+".slaveAgentPort", "10000"); | ||
System.setProperty(Jenkins.class.getName()+".slaveAgentPortEnforce", "true"); | ||
} | ||
|
||
@Rule | ||
public JenkinsRule j = new JenkinsRule(); | ||
|
||
@Test | ||
public void configRoundTrip() throws Exception { | ||
Jenkins.getInstance().setSecurityRealm(new HudsonPrivateSecurityRealm(true, false, null)); | ||
j.submit(j.createWebClient().goTo("configureSecurity").getFormByName("config")); | ||
} | ||
} |