]> source.dussan.org Git - sonarqube.git/commitdiff
Group its
authorDavid Gageot <david@gageot.net>
Wed, 2 Sep 2015 10:13:48 +0000 (12:13 +0200)
committerDavid Gageot <david@gageot.net>
Wed, 2 Sep 2015 12:25:02 +0000 (14:25 +0200)
17 files changed:
.travis.yml
it/it-tests/pom.xml
it/it-tests/src/test/java/administration/suite/AdministrationTestSuite.java
it/it-tests/src/test/java/analysis/suite/AnalysisTestSuite.java
it/it-tests/src/test/java/batch/BatchTest.java
it/it-tests/src/test/java/batch/IssuesModeTest.java
it/it-tests/src/test/java/batch/SettingsEncryptionTest.java
it/it-tests/src/test/java/batch/suite/BatchTestSuite.java
it/it-tests/src/test/java/issue/suite/IssueTestSuite.java
it/it-tests/src/test/java/plugins/PluginsTest.java
it/it-tests/src/test/java/qualitygate/QualityGateNotificationTest.java
it/it-tests/src/test/java/qualitygate/QualityGateTest.java
it/it-tests/src/test/java/server/HttpsTest.java
it/it-tests/src/test/java/server/ServerTest.java
it/it-tests/src/test/java/server/suite/ServerTestSuite.java
it/it-tests/src/test/java/updatecenter/UpdateCenterTest.java
travis.sh

index 6176151673044ab20a74f20c7f8fd731409caa79..7e5aeda364f3cb4cdea104eac4dcaeda9663249d 100644 (file)
@@ -9,14 +9,11 @@ env:
   - JOB=POSTGRES
   - JOB=MYSQL
   - JOB=WEB
-  - JOB=ITS IT_CATEGORY=issue
-  - JOB=ITS IT_CATEGORY=analysis
-  - JOB=ITS IT_CATEGORY=administration
   - JOB=ITS IT_CATEGORY=batch
-  - JOB=ITS IT_CATEGORY=server
   - JOB=ITS IT_CATEGORY=plugins
-  - JOB=ITS IT_CATEGORY=qualitygate
-  - JOB=ITS IT_CATEGORY=updatecenter
+  - JOB=ITS IT_CATEGORY=issue_analysis
+  - JOB=ITS IT_CATEGORY=administration_qualitygate
+  - JOB=ITS IT_CATEGORY=server_updatecenter
 
 matrix:
   fast_finish: true
index 3e67e663662c733ed7e8043cdbd96f17f5c9c3f2..b9ff1458842ce9a3bae61be8699956fb3a7c2906 100644 (file)
@@ -12,7 +12,8 @@
   <name>SonarQube Integration Tests :: Tests</name>
 
   <properties>
-    <category>*</category>
+    <category1>*</category1>
+    <category2>*</category2>
     <surefire.argLine>-Xmx128m -server</surefire.argLine>
     <skipIts>false</skipIts>
   </properties>
         <configuration>
           <skipTests>${skipIts}</skipTests>
           <includes>
-            <include>${category}/suite/*TestSuite.java</include>
+            <include>${category1}/suite/*TestSuite.java</include>
+            <include>${category2}/suite/*TestSuite.java</include>
             <!-- not included in suites -->
-            <include>${category}/*Test.java</include>
+            <include>${category1}/*Test.java</include>
+            <include>${category2}/*Test.java</include>
           </includes>
           <excludes>
             <!-- included into suites -->
index 6eca10ab2bd8c6ba6179ee786c857f7e82143605..8ffd47fe53d7ce58a722c16dc6da0c194af6d48b 100644 (file)
@@ -45,6 +45,7 @@ public class AdministrationTestSuite {
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
     .setServerProperty("sonar.notifications.delay", "1")
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.pluginArtifact("property-sets-plugin"))
     .addPlugin(ItUtils.pluginArtifact("sonar-subcategories-plugin"))
 
index a177c1df1969349ab366af40c308222fa1a6d1ba..06d0efefbde488f5b377546ae2a4b61e2cc2cce5 100644 (file)
@@ -46,6 +46,7 @@ public class AnalysisTestSuite {
 
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.xooPlugin())
     .build();
 }
index e0e03509df1e2c5939a322238849647c81c833d9..d4482b9278978c118575f709d4287d29bb00f9c3 100644 (file)
@@ -37,6 +37,7 @@ public class BatchTest {
 
   @ClassRule
   public static Orchestrator orchestrator = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.xooPlugin())
     .setContext("/")
 
index e4c0f3306a1d785e79a24907a824ad8d44e671ff..651546c0535006a2b4b9e1aa7d4d79968d25d79c 100644 (file)
@@ -50,8 +50,10 @@ public class IssuesModeTest {
 
   @ClassRule
   public static Orchestrator orchestrator = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.xooPlugin())
     .setContext("/")
+
     .addPlugin(ItUtils.pluginArtifact("access-secured-props-plugin"))
     .build();
 
index b415e496be4b307f8d4eb8368523c2254ed7157d..cc375155a6abbc90f386bfad9cc535a25acc66f1 100644 (file)
@@ -21,6 +21,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class SettingsEncryptionTest {
   @ClassRule
   public static Orchestrator orchestrator = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.pluginArtifact("settings-encryption-plugin"))
     .addPlugin(ItUtils.xooPlugin())
     .build();
index 4e77fd34e448cefec504796e288c4406a3608502..0431a2dbd025d91c22e54d8395f1b25306834f28 100644 (file)
@@ -22,6 +22,7 @@ public class BatchTestSuite {
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
     .addPlugin(ItUtils.xooPlugin())
+    .setSonarVersion("DEV")
     .setOrchestratorProperty("javaVersion", "LATEST_RELEASE").addPlugin("java")
     .setContext("/")
 
index b0f83bec16897f1be05c75df52bf776f4ef28fa3..7f765a62ec6c51839d527233b44c4470498f078e 100644 (file)
@@ -19,6 +19,7 @@ public class IssueTestSuite {
 
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.xooPlugin())
     .build();
 }
index 576f2aa27d500b2af4048e8efaa276ca2151fe10..5c5d9c859647c633b9e66137536240865205407c 100644 (file)
@@ -74,6 +74,7 @@ public class PluginsTest {
     OrchestratorBuilder builder = Orchestrator.builderEnv();
 
     // install latest compatible releases of plugins
+    builder.setSonarVersion("DEV");
     org.sonar.updatecenter.common.Version sonarVersion = org.sonar.updatecenter.common.Version.create(builder.getSonarVersion());
     builder.getUpdateCenter().setInstalledSonarVersion(sonarVersion);
     for (Plugin plugin : builder.getUpdateCenter().findAllCompatiblePlugins()) {
index c2f8450d7d2a923d48f36a03e5995796a7d52b5e..9547f29be5187f808953980ebbf94a28f6953b4b 100644 (file)
@@ -36,6 +36,7 @@ public class QualityGateNotificationTest {
 
   @ClassRule
   public static Orchestrator orchestrator = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.xooPlugin())
 
     // 1 second. Required for notification test.
index 5f975e93a2132af1275eaef9c4cd11a0ebb4d55c..bcda5733949d4f476a45dedb4479ed102f6eb469 100644 (file)
@@ -30,6 +30,7 @@ public class QualityGateTest {
 
   @ClassRule
   public static Orchestrator orchestrator = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.xooPlugin())
 
     // 1 second. Required for notification test.
index 4566ebd14c639249c96bcb18629fcfaad4c0a498..acf8d65755521bd73a2dc0a4ae2b6b3c80be1269 100644 (file)
@@ -69,6 +69,7 @@ public class HttpsTest {
     try {
       URL jksKeystore = getClass().getResource("/server/HttpsTest/keystore.jks");
       orchestrator = Orchestrator.builderEnv()
+        .setSonarVersion("DEV")
         .setServerProperty("sonar.web.https.port", String.valueOf(httpsPort))
         .setServerProperty("sonar.web.https.keyAlias", "tests")
         .setServerProperty("sonar.web.https.keyPass", "__wrong__")
@@ -88,6 +89,7 @@ public class HttpsTest {
     // start server
     URL jksKeystore = getClass().getResource("/server/HttpsTest/keystore.jks");
     orchestrator = Orchestrator.builderEnv()
+      .setSonarVersion("DEV")
       .setServerProperty("sonar.web.https.port", String.valueOf(httpsPort))
       .setServerProperty("sonar.web.https.keyAlias", "tests")
       .setServerProperty("sonar.web.https.keyPass", "thetests")
index 23ac3c27c34ca38874258427a5290eb7689ae5c6..f490194ff2cf2768d1ad3392b0e28ce52be53194 100644 (file)
@@ -43,6 +43,7 @@ public class ServerTest {
   public void test_settings() {
     URL secretKeyUrl = getClass().getResource("/server/ServerTest/sonar-secret.txt");
     orchestrator = Orchestrator.builderEnv()
+      .setSonarVersion("DEV")
       .addPlugin(ItUtils.pluginArtifact("settings-plugin"))
       .addPlugin(ItUtils.pluginArtifact("license-plugin"))
       .setServerProperty("sonar.secretKeyPath", secretKeyUrl.getFile())
@@ -77,6 +78,7 @@ public class ServerTest {
   @Test
   public void property_relocation() {
     orchestrator = Orchestrator.builderEnv()
+      .setSonarVersion("DEV")
       .addPlugin(ItUtils.pluginArtifact("property-relocation-plugin"))
       .addPlugin(ItUtils.xooPlugin())
       .setServerProperty("sonar.deprecatedKey", "true")
@@ -103,6 +105,7 @@ public class ServerTest {
   public void check_minimal_sonar_version_at_startup() throws Exception {
     try {
       orchestrator = Orchestrator.builderEnv()
+        .setSonarVersion("DEV")
         .addPlugin(FileLocation.of(new File(ServerTest.class.getResource("/server/ServerTest/incompatible-plugin-1.0.jar").toURI())))
         .build();
       orchestrator.start();
@@ -117,7 +120,10 @@ public class ServerTest {
   public void support_install_dir_with_whitespaces() throws Exception {
     String dirName = "target/has space";
     FileUtils.deleteDirectory(new File(dirName));
-    orchestrator = Orchestrator.builderEnv().setOrchestratorProperty("orchestrator.workspaceDir", dirName).build();
+    orchestrator = Orchestrator.builderEnv()
+        .setSonarVersion("DEV")
+        .setOrchestratorProperty("orchestrator.workspaceDir", dirName)
+        .build();
     orchestrator.start();
 
     Server.Status status = orchestrator.getServer().getAdminWsClient().find(new ServerQuery()).getStatus();
@@ -128,6 +134,7 @@ public class ServerTest {
   @Test
   public void should_create_in_temp_folder() throws Exception {
     orchestrator = Orchestrator.builderEnv()
+      .setSonarVersion("DEV")
       .addPlugin(ItUtils.pluginArtifact("server-plugin"))
       .setServerProperty("sonar.createTempFiles", "true")
       .build();
@@ -155,7 +162,9 @@ public class ServerTest {
   public void restart_forbidden_if_not_dev_mode() throws Exception {
     // server classloader locks Jar files on Windows
     if (!SystemUtils.IS_OS_WINDOWS) {
-      orchestrator = Orchestrator.builderEnv().build();
+      orchestrator = Orchestrator.builderEnv()
+        .setSonarVersion("DEV")
+        .build();
       orchestrator.start();
       try {
         orchestrator.getServer().adminWsClient().systemClient().restart();
@@ -173,7 +182,10 @@ public class ServerTest {
   public void restart_on_dev_mode() throws Exception {
     // server classloader locks Jar files on Windows
     if (!SystemUtils.IS_OS_WINDOWS) {
-      orchestrator = Orchestrator.builderEnv().setServerProperty("sonar.web.dev", "true").build();
+      orchestrator = Orchestrator.builderEnv()
+        .setSonarVersion("DEV")
+        .setServerProperty("sonar.web.dev", "true")
+        .build();
       orchestrator.start();
 
       orchestrator.getServer().adminWsClient().systemClient().restart();
index dd5897799cc5955911860136ac144af01ffbfc1d..241e11ae5f949a972261f957732a9fd445fb8fc4 100644 (file)
@@ -36,6 +36,7 @@ public class ServerTestSuite {
 
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .addPlugin(ItUtils.xooPlugin())
 
     // Used in global_property_change_extension_point
index d42907bfb8535c36968b38076f7ab70abb4e1065..8ac015a6bcf2be352e1c88230329acf5dade8aa5 100644 (file)
@@ -22,6 +22,7 @@ public class UpdateCenterTest {
 
   @ClassRule
   public static Orchestrator orchestrator = Orchestrator.builderEnv()
+    .setSonarVersion("DEV")
     .setServerProperty("sonar.updatecenter.url", UpdateCenterTest.class.getResource("UpdateCenterTest/update-center.properties").toString())
     .addPlugin(pluginArtifact("sonar-fake-plugin"))
     .build();
index 0073a88f6c03bff79b427e4e22a4539095734782..8d3d4e26986023714e1f8b24ae08e2f8c878c981 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -66,8 +66,13 @@ ITS)
   if [ "$IT_CATEGORY" == "plugins" ] && [ "$TRAVIS_PULL_REQUEST" == "true" ]; then
     echo "Ignore this job since it needs access to private test licenses."
   else
-       prepareIts
-       mvn install -Pit,dev -DskipTests -Dsonar.runtimeVersion=DEV -Dcategory=$IT_CATEGORY -Dmaven.test.redirectTestOutputToFile=false -e
+    prepareIts
+
+    CATEGORIES=($(echo "$IT_CATEGORY" | tr '_' '\n'))
+    CATEGORY1=${CATEGORIES[0]:-'NONE'}
+    CATEGORY2=${CATEGORIES[1]:-'NONE'}
+
+    mvn install -Pit,dev -DskipTests -Dcategory1="$CATEGORY1" -Dcategory2="$CATEGORY2" -Dmaven.test.redirectTestOutputToFile=false -e -T2 -Dsource.skip=true
   fi
   ;;