aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-06-15 11:46:31 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-06-15 12:18:58 +0200
commit1f58a64809043172ed3aadc8b9a5a0239d92ed33 (patch)
tree59a865c39a5ab92f87d727e564b578eebc5e3462
parent6430646c2e4c83ce157223e7a61327ba2f11d5e5 (diff)
downloadsonarqube-1f58a64809043172ed3aadc8b9a5a0239d92ed33.tar.gz
sonarqube-1f58a64809043172ed3aadc8b9a5a0239d92ed33.zip
Remove useless code from UpgradeTest
-rw-r--r--tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java16
1 files changed, 4 insertions, 12 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 991ef037cdb..08094969c2b 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
@@ -19,6 +19,8 @@
*/
package org.sonarsource.sonarqube.upgrade;
+import static org.assertj.core.api.Assertions.assertThat;
+
import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.build.MavenBuild;
@@ -34,8 +36,6 @@ import org.junit.After;
import org.junit.Test;
import org.sonar.wsclient.services.ResourceQuery;
-import static org.assertj.core.api.Assertions.assertThat;
-
public class UpgradeTest {
public static final String PROJECT_KEY = "org.apache.struts:struts-parent";
@@ -51,7 +51,7 @@ public class UpgradeTest {
}
@Test
- public void test_upgrade_from_4_5_lts() {
+ public void test_upgrade_from_4_5() {
testDatabaseUpgrade(Version.create("4.5.1"));
}
@@ -60,16 +60,12 @@ public class UpgradeTest {
testDatabaseUpgrade(Version.create("5.2"));
}
- private void testDatabaseUpgrade(Version fromVersion, BeforeUpgrade... tasks) {
+ private void testDatabaseUpgrade(Version fromVersion) {
startServer(fromVersion, false);
scanProject();
int files = countFiles(PROJECT_KEY);
assertThat(files).isGreaterThan(0);
- for (BeforeUpgrade task : tasks) {
- task.execute();
- }
-
stopServer();
// latest version
startServer(Version.create(Orchestrator.builderEnv().getSonarVersion()), true);
@@ -165,8 +161,4 @@ public class UpgradeTest {
}
}
}
-
- private static interface BeforeUpgrade {
- void execute();
- }
}