diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-07-26 14:14:33 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-07-29 10:31:31 +0200 |
commit | 7ce0fb39f58c6fd4d01075944e1756909fd6abc3 (patch) | |
tree | 57f20c617ec40e7031a12abb17d08b87cc984c57 /server/sonar-ce/src/test | |
parent | 13c05cb112bb10b2706d97b432d8208cd503208f (diff) | |
download | sonarqube-7ce0fb39f58c6fd4d01075944e1756909fd6abc3.tar.gz sonarqube-7ce0fb39f58c6fd4d01075944e1756909fd6abc3.zip |
SONAR-7899 Refactor server file system
- new interface org.sonar.server.platform.ServerFileSystem
- deprecate org.sonar.api.platform.Server#getDeployDir()
Diffstat (limited to 'server/sonar-ce/src/test')
-rw-r--r-- | server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java | 37 | ||||
-rw-r--r-- | server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginRepositoryTest.java | 8 |
2 files changed, 40 insertions, 5 deletions
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java index 4062a8747f3..59be2e53d21 100644 --- a/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java +++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java @@ -24,7 +24,7 @@ import java.io.IOException; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -import org.sonar.api.platform.ServerFileSystem; +import org.sonar.server.platform.ServerFileSystem; import org.sonar.core.platform.ExplodedPlugin; import org.sonar.core.platform.PluginInfo; @@ -98,6 +98,16 @@ public class CePluginJarExploderTest { } @Override + public File getDataDir() { + throw new UnsupportedOperationException(); + } + + @Override + public File getDeployDir() { + throw new UnsupportedOperationException(); + } + + @Override public File getHomeDir() { throw new UnsupportedOperationException(); } @@ -114,5 +124,30 @@ public class CePluginJarExploderTest { return tempDir; } + @Override + public File getDeployedPluginsDir() { + throw new UnsupportedOperationException(); + } + + @Override + public File getDownloadedPluginsDir() { + throw new UnsupportedOperationException(); + } + + @Override + public File getInstalledPluginsDir() { + throw new UnsupportedOperationException(); + } + + @Override + public File getBundledPluginsDir() { + throw new UnsupportedOperationException(); + } + + @Override + public File getPluginIndex() { + throw new UnsupportedOperationException(); + } + } } diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginRepositoryTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginRepositoryTest.java index a7ebbc8eff3..09c044809bf 100644 --- a/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginRepositoryTest.java +++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginRepositoryTest.java @@ -32,7 +32,7 @@ import org.mockito.Mockito; import org.sonar.api.Plugin; import org.sonar.core.platform.PluginInfo; import org.sonar.core.platform.PluginLoader; -import org.sonar.server.platform.DefaultServerFileSystem; +import org.sonar.server.platform.ServerFileSystem; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; @@ -46,9 +46,9 @@ public class CePluginRepositoryTest { @Rule public ExpectedException expectedException = ExpectedException.none(); - DefaultServerFileSystem fs = mock(DefaultServerFileSystem.class, Mockito.RETURNS_DEEP_STUBS); - PluginLoader pluginLoader = new DumbPluginLoader(); - CePluginRepository underTest = new CePluginRepository(fs, pluginLoader); + private ServerFileSystem fs = mock(ServerFileSystem.class, Mockito.RETURNS_DEEP_STUBS); + private PluginLoader pluginLoader = new DumbPluginLoader(); + private CePluginRepository underTest = new CePluginRepository(fs, pluginLoader); @After public void tearDown() { |