aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-07-08 08:42:25 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2016-07-08 08:42:25 +0200
commitd618b5cf39dc272232c69717de76229dd7fcdd9c (patch)
tree24bc911ace29013f38d3283c736c286e87738da0 /tests
parent379e9411bc7ec06cca075397dfee36fd42a94ca7 (diff)
parentdeaff9a9e8bf377d84fd8509ea676e7559fb04fc (diff)
downloadsonarqube-d618b5cf39dc272232c69717de76229dd7fcdd9c.tar.gz
sonarqube-d618b5cf39dc272232c69717de76229dd7fcdd9c.zip
Automatic merge from branch-5.6
* origin/branch-5.6: Fix Java plugin version in UpgradeTest
Diffstat (limited to 'tests')
-rw-r--r--tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java
index 88eb5e55a1b..dd9a803c7b1 100644
--- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java
+++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java
@@ -57,24 +57,24 @@ public class UpgradeTest {
}
@Test
- public void test_upgrade_from_4_5() {
- testDatabaseUpgrade(Version.create("4.5.1"));
+ public void test_upgrade_from_4_5_lts() {
+ testDatabaseUpgrade(Version.create("4.5.7"), "3.14");
}
@Test
public void test_upgrade_from_5_2() {
- testDatabaseUpgrade(Version.create("5.2"));
+ testDatabaseUpgrade(Version.create("5.2"), "3.14");
}
- private void testDatabaseUpgrade(Version fromVersion) {
- startServer(fromVersion, false);
+ private void testDatabaseUpgrade(Version fromVersion, String javaVersion) {
+ startServer(fromVersion, javaVersion, false);
scanProject();
int files = countFiles(PROJECT_KEY);
assertThat(files).isGreaterThan(0);
stopServer();
// latest version
- startServer(Version.create(Orchestrator.builderEnv().getSonarVersion()), true);
+ startServer(Version.create(Orchestrator.builderEnv().getSonarVersion()), "LATEST_RELEASE", true);
checkSystemStatus(ServerStatusResponse.Status.DB_MIGRATION_NEEDED);
checkUrlsBeforeUpgrade();
@@ -145,7 +145,7 @@ public class UpgradeTest {
assertThat(serverMigrationResponse.getStatus()).isEqualTo(ServerMigrationResponse.Status.MIGRATION_SUCCEEDED);
}
- private void startServer(Version sqVersion, boolean keepDatabase) {
+ private void startServer(Version sqVersion, String javaVersion, boolean keepDatabase) {
String jdbcUrl = MssqlConfig.fixUrl(Configuration.createEnv(), sqVersion);
OrchestratorBuilder builder = Orchestrator.builderEnv()
.setOrchestratorProperty("sonar.jdbc.url", jdbcUrl)
@@ -154,7 +154,7 @@ public class UpgradeTest {
if (!keepDatabase) {
builder.restoreProfileAtStartup(FileLocation.ofClasspath("/sonar-way-5.1.xml"));
}
- builder.setOrchestratorProperty("javaVersion", "OLDEST_COMPATIBLE").addPlugin("java");
+ builder.setOrchestratorProperty("javaVersion", javaVersion).addPlugin("java");
orchestrator = builder.build();
orchestrator.start();
}