aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/test
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-03-16 14:06:00 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-03-16 14:06:00 +0100
commitf2b39ccc3223c71b741b443ebc36999352958080 (patch)
treec874fd18660f31f0f507519864cdf9e43ce8d51e /sonar-batch/src/test
parent568969fea6803e47f28a85459c2053ca377f0b87 (diff)
downloadsonarqube-f2b39ccc3223c71b741b443ebc36999352958080.tar.gz
sonarqube-f2b39ccc3223c71b741b443ebc36999352958080.zip
Refactor plugin management for better maintainability
Diffstat (limited to 'sonar-batch/src/test')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest.java (renamed from sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginInstallerTest.java)8
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java6
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest/sonar-checkstyle-plugin-2.8.jar (renamed from sonar-batch/src/test/resources/org/sonar/batch/bootstrap/BatchPluginInstallerTest/sonar-checkstyle-plugin-2.8.jar)bin1026947 -> 1026947 bytes
3 files changed, 7 insertions, 7 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginInstallerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest.java
index de903420e73..52b80a87d5d 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginInstallerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest.java
@@ -32,9 +32,9 @@ import java.io.IOException;
import static org.fest.assertions.Assertions.assertThat;
-public class BatchPluginInstallerTest {
+public class BatchPluginJarInstallerTest {
- private BatchPluginInstaller extractor;
+ private BatchPluginJarInstaller extractor;
@ClassRule
public static TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -44,7 +44,7 @@ public class BatchPluginInstallerTest {
@Before
public void setUp() throws IOException {
userHome = temporaryFolder.newFolder();
- extractor = new BatchPluginInstaller(new FileCacheBuilder().setUserHome(userHome).build());
+ extractor = new BatchPluginJarInstaller(new FileCacheBuilder().setUserHome(userHome).build());
}
@Test
@@ -68,7 +68,7 @@ public class BatchPluginInstallerTest {
}
File getFileFromCache(String filename) throws IOException {
- File src = FileUtils.toFile(BatchPluginInstallerTest.class.getResource("/org/sonar/batch/bootstrap/BatchPluginInstallerTest/" + filename));
+ File src = FileUtils.toFile(BatchPluginJarInstallerTest.class.getResource("/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest/" + filename));
File destFile = new File(new File(userHome, "" + filename.hashCode()), filename);
FileUtils.copyFile(src, destFile);
return destFile;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java
index 84f92b7eab6..41a6d0048d5 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java
@@ -71,7 +71,7 @@ public class BatchPluginRepositoryTest {
PluginDownloader downloader = mock(PluginDownloader.class);
when(downloader.downloadPlugin(checkstyle)).thenReturn(fileFromCache("sonar-checkstyle-plugin-2.8.jar"));
- repository = new BatchPluginRepository(downloader, new Settings(), mode, new BatchPluginInstaller(cache));
+ repository = new BatchPluginRepository(downloader, new Settings(), mode, new BatchPluginJarInstaller(cache));
repository.doStart(Arrays.asList(checkstyle));
@@ -90,7 +90,7 @@ public class BatchPluginRepositoryTest {
when(downloader.downloadPlugin(checkstyle)).thenReturn(fileFromCache("sonar-checkstyle-plugin-2.8.jar"));
when(downloader.downloadPlugin(checkstyleExt)).thenReturn(fileFromCache("sonar-checkstyle-extensions-plugin-0.1-SNAPSHOT.jar"));
- repository = new BatchPluginRepository(downloader, new Settings(), mode, new BatchPluginInstaller(cache));
+ repository = new BatchPluginRepository(downloader, new Settings(), mode, new BatchPluginJarInstaller(cache));
repository.doStart(Arrays.asList(checkstyle, checkstyleExt));
@@ -112,7 +112,7 @@ public class BatchPluginRepositoryTest {
Settings settings = new Settings();
settings.setProperty(CoreProperties.BATCH_EXCLUDE_PLUGINS, "checkstyle");
- repository = new BatchPluginRepository(downloader, settings, mode, new BatchPluginInstaller(cache));
+ repository = new BatchPluginRepository(downloader, settings, mode, new BatchPluginJarInstaller(cache));
repository.doStart(Arrays.asList(checkstyle, checkstyleExt));
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/bootstrap/BatchPluginInstallerTest/sonar-checkstyle-plugin-2.8.jar b/sonar-batch/src/test/resources/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest/sonar-checkstyle-plugin-2.8.jar
index f937399bec5..f937399bec5 100644
--- a/sonar-batch/src/test/resources/org/sonar/batch/bootstrap/BatchPluginInstallerTest/sonar-checkstyle-plugin-2.8.jar
+++ b/sonar-batch/src/test/resources/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest/sonar-checkstyle-plugin-2.8.jar
Binary files differ