]> source.dussan.org Git - sonarqube.git/commitdiff
Fix unit test that were generated files not in a temp dir
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 18 Apr 2014 07:50:17 +0000 (09:50 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 18 Apr 2014 07:50:26 +0000 (09:50 +0200)
sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java

index fc0ef01ada4231f1a1d2b04a73a48ebab888c17f..c5404935d8d0d7437beb1fb32179fe3d5d4a10b4 100644 (file)
@@ -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);