aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2017-03-03 10:38:06 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2017-03-03 10:38:58 +0100
commitd9a8adec352374814382395b87fd034b0d5ab176 (patch)
tree997f86ac1cc18579cb3f434621ffe1965b3c691e /it
parent09e3a1a00d6149d707e5a67bfe0785b0204e34f4 (diff)
downloadsonarqube-d9a8adec352374814382395b87fd034b0d5ab176.tar.gz
sonarqube-d9a8adec352374814382395b87fd034b0d5ab176.zip
SONAR-8883 Reenable assertion
Diffstat (limited to 'it')
-rw-r--r--it/it-tests/src/test/java/it/analysis/ReportDumpTest.java2
-rw-r--r--it/it-tests/src/test/java/it/analysis/ScannerTest.java42
2 files changed, 1 insertions, 43 deletions
diff --git a/it/it-tests/src/test/java/it/analysis/ReportDumpTest.java b/it/it-tests/src/test/java/it/analysis/ReportDumpTest.java
index b5abec877c8..9f9a8ee9776 100644
--- a/it/it-tests/src/test/java/it/analysis/ReportDumpTest.java
+++ b/it/it-tests/src/test/java/it/analysis/ReportDumpTest.java
@@ -57,7 +57,7 @@ public class ReportDumpTest {
assertThat(props).hasSize(6);
assertThat(props.getProperty("projectKey")).isEqualTo("dump_metadata_of_uploaded_report");
assertThat(props.getProperty("ceTaskId")).isNotEmpty();
- // FIXME assertThat(props.getProperty("serverVersion")).isEqualTo(orchestrator.getServer().version().toString());
+ assertThat(props.getProperty("serverVersion")).isEqualTo(orchestrator.getServer().version().toString());
verifyUrl(props.getProperty("serverUrl"));
verifyUrl(props.getProperty("dashboardUrl"));
verifyUrl(props.getProperty("ceTaskUrl"));
diff --git a/it/it-tests/src/test/java/it/analysis/ScannerTest.java b/it/it-tests/src/test/java/it/analysis/ScannerTest.java
index be7ac934dd8..348a5fb3ab3 100644
--- a/it/it-tests/src/test/java/it/analysis/ScannerTest.java
+++ b/it/it-tests/src/test/java/it/analysis/ScannerTest.java
@@ -31,7 +31,6 @@ import org.apache.commons.io.FileUtils;
import org.junit.Assume;
import org.junit.Before;
import org.junit.ClassRule;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -378,47 +377,6 @@ public class ScannerTest {
assertThat(getComponent(orchestrator, "com.sonarsource.it.samples:moduleB")).isNotNull();
}
- /**
- * SONAR-4692
- */
- @Test
- @Ignore("This test should be moved to a Medium test of the Compute Engine")
- public void prevent_same_module_key_in_two_projects() {
- orchestrator.getServer().provisionProject("projectAB", "project AB");
- orchestrator.getServer().associateProjectToQualityProfile("projectAB", "xoo", "one-issue-per-line");
- scan("analysis/prevent-common-module/projectAB");
- assertThat(getComponent(orchestrator, "com.sonarsource.it.samples:moduleA")).isNotNull();
- assertThat(getComponent(orchestrator, "com.sonarsource.it.samples:moduleB")).isNotNull();
-
- orchestrator.getServer().provisionProject("projectAC", "project AC");
- orchestrator.getServer().associateProjectToQualityProfile("projectAC", "xoo", "one-issue-per-line");
-
- BuildResult result = scanQuietly("analysis/prevent-common-module/projectAC");
- assertThat(result.getLastStatus()).isNotEqualTo(0);
- assertThat(result.getLogs()).contains("Module \"com.sonarsource.it.samples:moduleA\" is already part of project \"projectAB\"");
- }
-
- /**
- * SONAR-4334
- */
- @Test
- @Ignore("Should be move to CE IT/MT")
- public void fail_if_project_date_is_older_than_latest_snapshot() {
- orchestrator.getServer().provisionProject("sample", "xoo-sample");
- orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
- SonarScanner analysis = SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"));
- analysis.setProperty("sonar.projectDate", "2014-01-01");
- orchestrator.executeBuild(analysis);
-
- analysis.setProperty("sonar.projectDate", "2000-10-19");
- BuildResult result = orchestrator.executeBuildQuietly(analysis);
-
- assertThat(result.getLastStatus()).isNotEqualTo(0);
- assertThat(result.getLogs()).contains("'sonar.projectDate' property cannot be older than the date of the last known quality snapshot on this project. Value: '2000-10-19'. " +
- "Latest quality snapshot: ");
- assertThat(result.getLogs()).contains("This property may only be used to rebuild the past in a chronological order.");
- }
-
private BuildResult scan(String projectPath, String... props) {
SonarScanner scanner = configureScanner(projectPath, props);
return orchestrator.executeBuild(scanner);