From: Julien Lancelot Date: Fri, 18 Apr 2014 07:50:17 +0000 (+0200) Subject: Fix unit test that were generated files not in a temp dir X-Git-Tag: 4.4-RC1~1445^2~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e231bbdf679e6bce723f2607685986f5cff4d3b0;p=sonarqube.git Fix unit test that were generated files not in a temp dir --- diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java index fc0ef01ada4..c5404935d8d 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java @@ -59,6 +59,8 @@ public class ServerPluginJarsInstallerTest { @Before public void before() throws IOException { when(server.getVersion()).thenReturn("3.1"); + when(server.getDeployDir()).thenReturn(temp.newFolder("deploy")); + homeDir = temp.newFolder("home"); pluginsDir = new File(homeDir, "extensions/plugins"); FileUtils.forceMkdir(pluginsDir); @@ -67,6 +69,7 @@ public class ServerPluginJarsInstallerTest { bundledDir = new File(homeDir, "lib/bundled-plugins"); coreDir = new File(homeDir, "lib/core-plugins"); FileUtils.forceMkdir(bundledDir); + fileSystem = new DefaultServerFileSystem(mock(Database.class), homeDir, server); jarInstaller = new ServerPluginJarInstaller(); jarsInstaller = new ServerPluginJarsInstaller(server, upgradeStatus, fileSystem, jarInstaller);