aboutsummaryrefslogtreecommitdiffstats
path: root/it/it-tests
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-03-22 15:14:52 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2016-03-22 15:15:48 +0100
commit6104eabc38436443090b3fa63f942f453eecfdc9 (patch)
tree5988011e3460f68fa9478b3cb75a69abe49e5b21 /it/it-tests
parenteec3233505be2d6d9cc95c9bfc8359b91572ac51 (diff)
downloadsonarqube-6104eabc38436443090b3fa63f942f453eecfdc9.tar.gz
sonarqube-6104eabc38436443090b3fa63f942f453eecfdc9.zip
SONAR-7487 Fix ITs
Diffstat (limited to 'it/it-tests')
-rw-r--r--it/it-tests/src/test/java/it/measureHistory/SinceXDaysHistoryTest.java19
-rw-r--r--it/it-tests/src/test/java/it/projectAdministration/ProjectAdministrationTest.java4
-rw-r--r--it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-settings/override-global-settings.html14
3 files changed, 19 insertions, 18 deletions
diff --git a/it/it-tests/src/test/java/it/measureHistory/SinceXDaysHistoryTest.java b/it/it-tests/src/test/java/it/measureHistory/SinceXDaysHistoryTest.java
index 6141e1a3164..eedd98fe8a5 100644
--- a/it/it-tests/src/test/java/it/measureHistory/SinceXDaysHistoryTest.java
+++ b/it/it-tests/src/test/java/it/measureHistory/SinceXDaysHistoryTest.java
@@ -20,11 +20,12 @@
package it.measureHistory;
import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
import com.sonar.orchestrator.locator.FileLocation;
import it.Category1Suite;
import java.text.SimpleDateFormat;
import java.util.Date;
+import javax.annotation.Nullable;
import org.apache.commons.lang.time.DateUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -47,7 +48,7 @@ public class SinceXDaysHistoryTest {
@ClassRule
public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR;
- private static final String PROJECT = "com.sonarsource.it.samples:multi-modules-sample";
+ private static final String PROJECT = "multi-files-sample";
@BeforeClass
public static void analyseProjectWithHistory() {
@@ -59,13 +60,13 @@ public class SinceXDaysHistoryTest {
orchestrator.getServer().associateProjectToQualityProfile(PROJECT, "xoo", "one-issue-per-line");
// Execute a analysis in the past before since 30 days period -> 0 issue, 0 file
- analyzeProject("2013-01-01", "multi-modules-sample:module_b,multi-modules-sample:module_a");
+ analyzeProject("2013-01-01", "**/File1*,**/File2*,**/File3*,**/File4*");
// Execute a analysis 20 days ago, after since 30 days period -> 16 issues, 1 file
- analyzeProject(getPastDate(20), "multi-modules-sample:module_b,multi-modules-sample:module_a:module_a2");
+ analyzeProject(getPastDate(20), "**/File2*,**/File3*,**/File4*");
// Execute a analysis 10 days ago, after since 30 days period -> 28 issues, 2 files
- analyzeProject(getPastDate(10), "multi-modules-sample:module_b");
+ analyzeProject(getPastDate(10), "**/File3*,**/File4*");
// Execute a analysis in the present with all modules -> 52 issues, 4 files
analyzeProject();
@@ -123,13 +124,13 @@ public class SinceXDaysHistoryTest {
analyzeProject(null, null);
}
- private static void analyzeProject(String date, String skippedModules) {
- SonarRunner runner = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"));
+ private static void analyzeProject(@Nullable String date, @Nullable String exclusions) {
+ SonarScanner runner = SonarScanner.create(projectDir("measureHistory/xoo-multi-files-sample"));
if (date != null) {
runner.setProperty("sonar.projectDate", date);
}
- if (skippedModules != null) {
- runner.setProperties("sonar.skippedModules", skippedModules);
+ if (exclusions != null) {
+ runner.setProperties("sonar.exclusions", exclusions);
}
orchestrator.executeBuild(runner);
}
diff --git a/it/it-tests/src/test/java/it/projectAdministration/ProjectAdministrationTest.java b/it/it-tests/src/test/java/it/projectAdministration/ProjectAdministrationTest.java
index 71571b3fdd1..a5796f91824 100644
--- a/it/it-tests/src/test/java/it/projectAdministration/ProjectAdministrationTest.java
+++ b/it/it-tests/src/test/java/it/projectAdministration/ProjectAdministrationTest.java
@@ -174,8 +174,8 @@ public class ProjectAdministrationTest {
).build();
new SeleneseTest(selenese).runOn(orchestrator);
- assertThat(orchestrator.getServer().getAdminWsClient().find(PropertyQuery.createForResource("sonar.skippedModules", "sample")).getValue())
- .isEqualTo("my-excluded-module");
+ assertThat(orchestrator.getServer().getAdminWsClient().find(PropertyQuery.createForResource("sonar.exclusions", "sample")).getValue())
+ .isEqualTo("my-exclusions");
}
/**
diff --git a/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-settings/override-global-settings.html b/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-settings/override-global-settings.html
index 8d76ad511fb..f9ab41f50b3 100644
--- a/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-settings/override-global-settings.html
+++ b/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-settings/override-global-settings.html
@@ -40,18 +40,18 @@
</tr>
<tr>
<td>type</td>
- <td>id=input_sonar.skippedModules</td>
- <td>my-excluded-module</td>
+ <td>id=input_sonar.exclusions</td>
+ <td>my-exclusions</td>
</tr>
- <tr>
- <td>click</td>
- <td>id=submit_settings</td>
+<tr>
+ <td>click</td>
+ <td>id=submit_settings</td>
<td></td>
</tr>
<tr>
<td>waitForValue</td>
- <td>id=input_sonar.skippedModules</td>
- <td>my-excluded-module</td>
+ <td>id=input_sonar.exclusions</td>
+ <td>my-exclusions</td>
</tr>
</tbody>
</table>