aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-07-18 14:07:16 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2016-07-18 15:52:31 +0200
commit2014025063e2b1e9b8f0d98936b99fbe6491aa04 (patch)
treeabacf6132dadfe710d022697c40fdbf1061c8f20 /it
parentdb826ad170e332ca71b93d28d6924b7daf4a9476 (diff)
downloadsonarqube-2014025063e2b1e9b8f0d98936b99fbe6491aa04.tar.gz
sonarqube-2014025063e2b1e9b8f0d98936b99fbe6491aa04.zip
Fix SonarQube version to use in PluginsTest
Diffstat (limited to 'it')
-rw-r--r--it/it-tests/src/test/java/it/plugins/PluginsTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/it/it-tests/src/test/java/it/plugins/PluginsTest.java b/it/it-tests/src/test/java/it/plugins/PluginsTest.java
index 3f6e038b64d..e819b338f38 100644
--- a/it/it-tests/src/test/java/it/plugins/PluginsTest.java
+++ b/it/it-tests/src/test/java/it/plugins/PluginsTest.java
@@ -51,6 +51,7 @@ import org.junit.Test;
import org.junit.rules.ErrorCollector;
import org.sonar.updatecenter.common.Plugin;
import org.sonar.updatecenter.common.Release;
+import org.sonar.updatecenter.common.Version;
import static org.assertj.core.api.Assertions.fail;
@@ -97,10 +98,11 @@ public class PluginsTest {
// install latest compatible releases of plugins
org.sonar.updatecenter.common.Version sonarVersion = org.sonar.updatecenter.common.Version.create(builder.getSonarVersion());
- builder.getUpdateCenter().setInstalledSonarVersion(sonarVersion);
+ Version sonarVersionWithoutPatch = Version.create(sonarVersion.getMajor() + "." + sonarVersion.getMinor());
+ builder.getUpdateCenter().setInstalledSonarVersion(sonarVersionWithoutPatch);
for (Plugin plugin : builder.getUpdateCenter().findAllCompatiblePlugins()) {
if (!DISABLED_PLUGINS.contains(plugin.getKey())) {
- Release release = plugin.getLastCompatibleRelease(sonarVersion);
+ Release release = plugin.getLastCompatibleRelease(sonarVersionWithoutPatch);
if (release != null) {
builder.setOrchestratorProperty(plugin.getKey() + "Version", release.getVersion().toString());
builder.addPlugin(plugin.getKey());