]> source.dussan.org Git - sonarqube.git/commitdiff
Remove useless code from UpgradeTest
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 15 Jun 2016 09:46:31 +0000 (11:46 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 15 Jun 2016 10:18:58 +0000 (12:18 +0200)
tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java

index 991ef037cdb2de5a121290a0c434ef1239e0c5a3..08094969c2b1be66906d625986038a11ab293d9c 100644 (file)
@@ -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();
-  }
 }