mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-01 11:05:56 +01:00
Fix bugs in unit tests which occur on Windows only (#1927)
On Windows it is much more necessary to close files to avoid locked files which prevent deleting a temporary file or folder. Also paths need to be handled differently because of the drive letter and colon appearing on Windows.
This commit is contained in:
committed by
GitHub
parent
63ec4e6172
commit
0f01bb82c6
@@ -40,6 +40,7 @@ import sonia.scm.config.ScmConfiguration;
|
||||
import sonia.scm.net.GlobalProxyConfiguration;
|
||||
import sonia.scm.repository.RepositoryTestData;
|
||||
import sonia.scm.repository.api.MirrorCommandResult;
|
||||
import sonia.scm.util.SystemUtil;
|
||||
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import java.io.File;
|
||||
@@ -115,7 +116,7 @@ public class SvnMirrorCommandTest extends AbstractSvnCommandTestBase {
|
||||
|
||||
private MirrorCommandRequest createRequest(File source) {
|
||||
MirrorCommandRequest request = new MirrorCommandRequest();
|
||||
request.setSourceUrl("file://" + source.getAbsolutePath());
|
||||
request.setSourceUrl("file://" + (SystemUtil.isWindows() ? "/" : "") + source.getAbsolutePath());
|
||||
return request;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user