]> source.dussan.org Git - sonarqube.git/commitdiff
Drop unsupported property sonar.dynamicAnalysis from tests
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 9 Jan 2018 09:52:58 +0000 (10:52 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 9 Jan 2018 13:25:49 +0000 (14:25 +0100)
tests/src/test/java/org/sonarqube/tests/analysis/ExtensionLifecycleTest.java
tests/src/test/java/org/sonarqube/tests/analysis/FileExclusionsTest.java
tests/src/test/java/org/sonarqube/tests/analysis/ProjectBuilderTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssuePurgeTest.java
tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java

index e5fa14d98195695dcaa269f6d862c0d99ee50c8c..de8ffa8bb435d6a0b716bb9172b6fba49c472337 100644 (file)
@@ -41,8 +41,7 @@ public class ExtensionLifecycleTest {
   public void testInstantiationStrategyAndLifecycleOfBatchExtensions() {
     MavenBuild build = MavenBuild.create(ItUtils.projectPom("analysis/extension-lifecycle"))
       .setCleanSonarGoals()
-      .setProperty("extension.lifecycle", "true")
-      .setProperty("sonar.dynamicAnalysis", "false");
+      .setProperty("extension.lifecycle", "true");
 
     // Build fails if the extensions provided in the extension-lifecycle-plugin are not correctly
     // managed.
index a787f07322f9784c2f11a17b78d9e8dc7706f971..ef0241dc7782df79eddd2832486a38237d15f3b9 100644 (file)
@@ -80,9 +80,7 @@ public class FileExclusionsTest {
    */
   @Test
   public void include_source_files() {
-    scan(
-      "sonar.dynamicAnalysis", "false",
-      "sonar.inclusions", "**/*One.xoo,**/*Two.xoo");
+    scan("sonar.inclusions", "**/*One.xoo,**/*Two.xoo");
 
     assertThat(getMeasuresAsDouble("files").get("files")).isEqualTo(2);
 
index d409a2231b80f16d5e09d9c09c3419682f398046..cf5d9fc1e37e91311ac33ad3ddf6ee276563e5bb 100644 (file)
@@ -48,8 +48,7 @@ public class ProjectBuilderTest {
   public void shouldDefineProjectFromPlugin() {
     MavenBuild build = MavenBuild.create(ItUtils.projectPom("analysis/project-builder"))
       .setCleanSonarGoals()
-      .setProperty("sonar.enableProjectBuilder", "true")
-      .setProperty("sonar.dynamicAnalysis", "false");
+      .setProperty("sonar.enableProjectBuilder", "true");
     orchestrator.executeBuild(build);
 
     checkProject();
index eb006535ae1ce818714363a6ef4208e9c189a3f8..0df918db0026ec01990845bd8037791f694dc03b 100644 (file)
@@ -40,7 +40,7 @@ public class IssuePurgeTest extends AbstractIssueTest {
   private ProjectAnalysis xooMultiModuleAnalysis;
 
   @Before
-  public void setUp() throws Exception {
+  public void setUp() {
     String manyRulesProfile = projectAnalysisRule.registerProfile("/issue/IssuePurgeTest/with-many-rules.xml");
     String xooSampleProjectKey = projectAnalysisRule.registerProject("shared/xoo-sample");
     this.xooSampleAnalysis = projectAnalysisRule.newProjectAnalysis(xooSampleProjectKey)
@@ -54,13 +54,11 @@ public class IssuePurgeTest extends AbstractIssueTest {
    * SONAR-4308
    */
   @Test
-  public void purge_old_closed_issues() throws Exception {
+  public void purge_old_closed_issues() {
     projectAnalysisRule.setServerProperty("sonar.dbcleaner.daysBeforeDeletingClosedIssues", "5000");
 
     // Generate some issues
-    xooSampleAnalysis.withProperties(
-      "sonar.dynamicAnalysis", "false",
-      "sonar.projectDate", "2014-10-01")
+    xooSampleAnalysis.withProperties("sonar.projectDate", "2014-10-01")
       .run();
 
     // All the issues are open
@@ -73,9 +71,7 @@ public class IssuePurgeTest extends AbstractIssueTest {
     // -> Not deleted because less than 5000 days long
     xooSampleAnalysis
       .withXooEmptyProfile()
-      .withProperties(
-        "sonar.dynamicAnalysis", "false",
-        "sonar.projectDate", "2014-10-15")
+      .withProperties("sonar.projectDate", "2014-10-15")
       .run();
     issuesList = searchIssues();
     assertThat(issuesList).isNotEmpty();
@@ -88,9 +84,7 @@ public class IssuePurgeTest extends AbstractIssueTest {
     projectAnalysisRule.setServerProperty("sonar.dbcleaner.daysBeforeDeletingClosedIssues", "1");
 
     xooSampleAnalysis.withXooEmptyProfile()
-      .withProperties(
-        "sonar.dynamicAnalysis", "false",
-        "sonar.projectDate", "2014-10-20")
+      .withProperties("sonar.projectDate", "2014-10-20")
       .run();
     Issues issues = issueClient().find(IssueQuery.create());
     assertThat(issues.list()).isEmpty();
@@ -101,13 +95,11 @@ public class IssuePurgeTest extends AbstractIssueTest {
    * SONAR-7108
    */
   @Test
-  public void purge_old_closed_issues_when_zero_closed_issues_wanted() throws Exception {
+  public void purge_old_closed_issues_when_zero_closed_issues_wanted() {
     projectAnalysisRule.setServerProperty("sonar.dbcleaner.daysBeforeDeletingClosedIssues", "5000");
 
     // Generate some issues
-    xooSampleAnalysis.withProperties(
-      "sonar.dynamicAnalysis", "false",
-      "sonar.projectDate", "2014-10-01")
+    xooSampleAnalysis.withProperties("sonar.projectDate", "2014-10-01")
       .run();
 
     // All the issues are open
@@ -120,9 +112,7 @@ public class IssuePurgeTest extends AbstractIssueTest {
     // -> Not deleted because less than 5000 days long
     xooSampleAnalysis
       .withXooEmptyProfile()
-      .withProperties(
-        "sonar.dynamicAnalysis", "false",
-        "sonar.projectDate", "2014-10-15")
+      .withProperties("sonar.projectDate", "2014-10-15")
       .run();
     issueList = searchIssues();
     assertThat(issueList).isNotEmpty();
@@ -135,9 +125,7 @@ public class IssuePurgeTest extends AbstractIssueTest {
     projectAnalysisRule.setServerProperty("sonar.dbcleaner.daysBeforeDeletingClosedIssues", "0");
 
     xooSampleAnalysis.withXooEmptyProfile()
-      .withProperties(
-        "sonar.dynamicAnalysis", "false",
-        "sonar.projectDate", "2014-10-20")
+      .withProperties("sonar.projectDate", "2014-10-20")
       .run();
 
     Issues issues = issueClient().find(IssueQuery.create());
@@ -149,11 +137,9 @@ public class IssuePurgeTest extends AbstractIssueTest {
    * SONAR-5200
    */
   @Test
-  public void resolve_issues_when_removing_module() throws Exception {
+  public void resolve_issues_when_removing_module() {
     // Generate some issues
-    xooMultiModuleAnalysis
-      .withProperties("sonar.dynamicAnalysis", "false")
-      .run();
+    xooMultiModuleAnalysis.run();
 
     // All the issues are open
     List<Issue> issues = searchIssues();
@@ -167,9 +153,7 @@ public class IssuePurgeTest extends AbstractIssueTest {
 
     // Second scan without module B -> issues on module B are resolved as removed and closed
     xooMultiModuleAnalysis
-      .withProperties(
-        "sonar.dynamicAnalysis", "false",
-        "sonar.modules", "module_a")
+      .withProperties("sonar.modules", "module_a")
       .run();
 
     // Resolved should should all be mark as REMOVED and affect to module b
index 78876ec9ca315d7c39b89537e1ed7f987d7808f1..0828b039b116372769b9b4037ec12995927ca485 100644 (file)
@@ -195,7 +195,6 @@ public class UpgradeTest {
       // exclude pom.xml, otherwise it will be published in SQ 6.3+ and not in previous versions, resulting in a different number of
       // components
       .setProperty("sonar.exclusions", "**/pom.xml")
-      .setProperty("sonar.dynamicAnalysis", "false")
       .setProperty("sonar.scm.disabled", "true")
       .setProperty("sonar.cpd.cross_project", "true");
     orchestrator.executeBuild(build);