Working around a space-in-path bug with the SSH private key.
@@ -39,9 +39,11 @@ import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject;
import org.jenkinsci.test.acceptance.docker.DockerClassRule;
+import org.junit.AfterClass;
import org.junit.ClassRule;
import org.junit.Test;
import static org.junit.Assert.*;
+import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
import org.jvnet.hudson.test.BuildWatcher;
@@ -50,6 +52,16 @@ import org.jvnet.hudson.test.JenkinsRule;
public class MercurialSCMSource2Test {
+ // TODO -i option for authentication does not work with a space in $JENKINS_HOME (or agent root)
+ private static String noSpaceInTmpDirs;
+ @BeforeClass public static void noSpaceInTmpDirsSet() {
+ noSpaceInTmpDirs = System.getProperty("jenkins.test.noSpaceInTmpDirs", /* setProperty does not accept null */"false");
+ System.setProperty("jenkins.test.noSpaceInTmpDirs", "true");
+ }
+ @AfterClass public static void noSpaceInTmpDirsReset() {
+ System.setProperty("jenkins.test.noSpaceInTmpDirs", noSpaceInTmpDirs);
+ }
+
@ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule public JenkinsRule r = new JenkinsRule();
@Rule public MercurialRule m = new MercurialRule(r);
