From: Godin Date: Wed, 3 Nov 2010 09:20:24 +0000 (+0000) Subject: Use the same rules everywhere to transform plugin key X-Git-Tag: 2.6~685 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3d4601ba4a45f709275d3c7cb8cc1cbaa210c087;p=sonarqube.git Use the same rules everywhere to transform plugin key --- diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java index 57ec82a5136..02f5041d4b8 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java @@ -23,6 +23,12 @@ import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; +import java.io.File; +import java.io.IOException; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.List; + import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; @@ -38,12 +44,6 @@ import org.sonar.server.platform.ServerImpl; import org.sonar.server.platform.ServerStartException; import org.sonar.test.TestUtils; -import java.io.File; -import java.io.IOException; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.List; - public class PluginDeployerTest extends AbstractDbUnitTestCase { private Server server; @@ -104,21 +104,21 @@ public class PluginDeployerTest extends AbstractDbUnitTestCase { List plugins = dao.getPlugins(); assertThat(plugins.size(), is(1)); // no more checkstyle JpaPlugin plugin = plugins.get(0); - assertThat(plugin.getKey(), is("build-breaker")); + assertThat(plugin.getKey(), is("buildbreaker")); assertThat(plugin.getFiles().size(), is(1)); assertThat(plugin.isCore(), is(false)); assertThat(plugin.isUseChildFirstClassLoader(), is(false)); JpaPluginFile pluginFile = plugin.getFiles().get(0); assertThat(pluginFile.getFilename(), is("sonar-build-breaker-plugin-0.1.jar")); - assertThat(pluginFile.getPath(), is("build-breaker/sonar-build-breaker-plugin-0.1.jar")); + assertThat(pluginFile.getPath(), is("buildbreaker/sonar-build-breaker-plugin-0.1.jar")); // check that the file is deployed - File deployedJar = new File(deployDir, "plugins/build-breaker/sonar-build-breaker-plugin-0.1.jar"); + File deployedJar = new File(deployDir, "plugins/buildbreaker/sonar-build-breaker-plugin-0.1.jar"); assertThat(deployedJar.exists(), is(true)); assertThat(deployedJar.isFile(), is(true)); // check that the plugin has its own classloader - ClassLoader classloader = classloaders.getClassLoader("build-breaker"); + ClassLoader classloader = classloaders.getClassLoader("buildbreaker"); assertNotNull(classloader); assertNotNull(classloader.loadClass("org.sonar.plugins.buildbreaker.BuildBreakerPlugin")); }