aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-api/src/test
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2020-09-10 14:04:14 -0500
committersonartech <sonartech@sonarsource.com>2020-09-18 20:07:16 +0000
commit3e861b4dc2810af234cfa2a97bd8519960ff3b4a (patch)
tree32eb144eb9eb30f4b2fa477af330c4324b40c6c3 /server/sonar-webserver-api/src/test
parent59f329469693de82d2f39c3b65aabafd47b366dc (diff)
downloadsonarqube-3e861b4dc2810af234cfa2a97bd8519960ff3b4a.tar.gz
sonarqube-3e861b4dc2810af234cfa2a97bd8519960ff3b4a.zip
SONAR-13643 Improve error message when duplicate plugins are present
Diffstat (limited to 'server/sonar-webserver-api/src/test')
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginJarLoaderTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginJarLoaderTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginJarLoaderTest.java
index 0297973bd14..aeb366501f0 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginJarLoaderTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginJarLoaderTest.java
@@ -202,8 +202,8 @@ public class PluginJarLoaderTest {
createJar(fs.getInstalledBundledPluginsDir(), "plugin1", "main", null);
String dir = getDirName(fs.getInstalledExternalPluginsDir());
- expectedException.expectMessage("Found a plugin 'plugin1' in the directory " + dir + " with the same key [plugin1] as a bundled plugin 'plugin1'. "
- + "Please remove " + jar.getName());
+ expectedException.expectMessage("Found a plugin 'plugin1' in the directory '" + dir + "' with the same key [plugin1] as a built-in feature 'plugin1'. "
+ + "Please remove '" + new File(dir, jar.getName()) + "'");
expectedException.expect(MessageException.class);
underTest.loadPlugins();
}
@@ -213,7 +213,7 @@ public class PluginJarLoaderTest {
File downloaded = createJar(fs.getDownloadedPluginsDir(), "plugin1", "main", null);
createJar(fs.getInstalledBundledPluginsDir(), "plugin1", "main", null);
String dir = getDirName(fs.getDownloadedPluginsDir());
- expectedException.expectMessage("Fail to update plugin: plugin1. Bundled plugin with same key already exists: plugin1. "
+ expectedException.expectMessage("Fail to update plugin: plugin1. Built-in feature with same key already exists: plugin1. "
+ "Move or delete plugin from " + dir + " directory");
expectedException.expect(MessageException.class);
underTest.loadPlugins();
@@ -225,7 +225,7 @@ public class PluginJarLoaderTest {
File jar2 = createJar(fs.getInstalledExternalPluginsDir(), "plugin1", "main", null);
String dir = getDirName(fs.getInstalledExternalPluginsDir());
- expectedException.expectMessage("Found two versions of the plugin 'plugin1' [plugin1] in the directory " + dir + ". Please remove ");
+ expectedException.expectMessage("Found two versions of the plugin 'plugin1' [plugin1] in the directory '" + dir + "'. Please remove ");
expectedException.expectMessage(jar2.getName());
expectedException.expectMessage(jar1.getName());
expectedException.expect(MessageException.class);