Fix IssueBulkChangeTest IT related to action plan removal

This commit is contained in:
Teryk Bellahsene 2016-03-29 10:59:39 +02:00
vanhempi 52cc88864a
commit 48fdffcfc0

Näytä tiedosto

@ -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;