From: Simon Brandhof Date: Wed, 15 Jun 2016 09:46:31 +0000 (+0200) Subject: Remove useless code from UpgradeTest X-Git-Tag: 6.0-RC1~311 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1f58a64809043172ed3aadc8b9a5a0239d92ed33;p=sonarqube.git Remove useless code from UpgradeTest --- 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(); - } }