]> source.dussan.org Git - sonarqube.git/commitdiff
Fix IssueBulkChangeTest IT related to action plan removal
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 29 Mar 2016 08:59:39 +0000 (10:59 +0200)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 29 Mar 2016 08:59:39 +0000 (10:59 +0200)
it/it-tests/src/test/java/it/issue/IssueBulkChangeTest.java

index 5a8e64968e47010c81586be68a2e7d444e7001fc..b3188669728522988f886b4c6a4d3411de462852 100644 (file)
@@ -27,13 +27,9 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.sonar.wsclient.base.HttpException;
-import org.sonar.wsclient.issue.ActionPlan;
-import org.sonar.wsclient.issue.ActionPlanClient;
 import org.sonar.wsclient.issue.BulkChange;
 import org.sonar.wsclient.issue.BulkChangeQuery;
 import org.sonar.wsclient.issue.Issue;
-import org.sonar.wsclient.issue.NewActionPlan;
-import util.ItUtils;
 import util.ProjectAnalysis;
 import util.ProjectAnalysisRule;
 import util.QaOnly;
@@ -98,28 +94,6 @@ public class IssueBulkChangeTest extends AbstractIssueTest {
     }
   }
 
-  @Test
-  public void should_plan() {
-    xooSampleLittleIssuesAnalysis.run();
-
-    // Create action plan
-    ActionPlan newActionPlan = adminActionPlanClient().create(
-      NewActionPlan.create().name("Short term").project("sample").description("Short term issues").deadLine(ItUtils.toDate("2113-01-31")));
-
-    String[] issueKeys = searchIssueKeys(BULK_EDITED_ISSUE_COUNT);
-    BulkChange bulkChange = adminIssueClient().bulkChange(
-      BulkChangeQuery.create()
-        .issues(issueKeys)
-        .actions("plan")
-        .actionParameter("plan", "plan", newActionPlan.key())
-      );
-
-    assertThat(bulkChange.totalIssuesChanged()).isEqualTo(BULK_EDITED_ISSUE_COUNT);
-    for (Issue issue : searchIssues(issueKeys)) {
-      assertThat(issue.actionPlan()).isEqualTo(newActionPlan.key());
-    }
-  }
-
   @Test
   public void should_setSeverity_add_comment_in_single_WS_call() {
     xooSampleLittleIssuesAnalysis.run();
@@ -315,10 +289,6 @@ public class IssueBulkChangeTest extends AbstractIssueTest {
     return getIssueKeys(searchIssues(), limit);
   }
 
-  private static ActionPlanClient adminActionPlanClient() {
-    return ORCHESTRATOR.getServer().adminWsClient().actionPlanClient();
-  }
-
   private enum IssueToKey implements Function<Issue, String> {
     INSTANCE;