summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-11-28 17:25:20 +0100
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-11-28 17:25:27 +0100
commit58dd4353773af1c010facbcc05c17cd1cac5b9be (patch)
tree94406dcf857adad5db1bc4ed0791854025bfea02 /server
parentc0ea0f9938136275c9369231ee1386024d7543be (diff)
downloadsonarqube-58dd4353773af1c010facbcc05c17cd1cac5b9be.tar.gz
sonarqube-58dd4353773af1c010facbcc05c17cd1cac5b9be.zip
SONAR-5742 Add ignorePaging parameter handle to WS client (for IT)
Diffstat (limited to 'server')
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java9
-rw-r--r--server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java6
2 files changed, 13 insertions, 2 deletions
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
index 304fee715b9..a5d1817b570 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
@@ -151,6 +151,15 @@ public class IssueQuery {
return this;
}
+ /**
+ * Only valid with one component, do not use in the general case
+ * @since 5.0
+ */
+ public IssueQuery ignorePaging(boolean ignorePaging) {
+ params.put("ignorePaging", ignorePaging);
+ return this;
+ }
+
private IssueQuery addParam(String key, String[] values) {
if (values != null) {
params.put(key, EncodingUtils.toQueryParam(values));
diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
index c4d0e209d14..ae1aadd3704 100644
--- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
+++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
@@ -59,9 +59,10 @@ public class IssueQueryTest {
.sort("ASSIGNEE")
.asc(false)
.pageSize(5)
- .pageIndex(4);
+ .pageIndex(4)
+ .ignorePaging(true);
- assertThat(query.urlParams()).hasSize(22);
+ assertThat(query.urlParams()).hasSize(23);
assertThat(query.urlParams()).includes(entry("issues", "ABCDE,FGHIJ"));
assertThat(query.urlParams()).includes(entry("assignees", "arthur,perceval"));
assertThat(query.urlParams()).includes(entry("assigned", true));
@@ -84,6 +85,7 @@ public class IssueQueryTest {
assertThat(query.urlParams()).includes(entry("asc", false));
assertThat(query.urlParams()).includes(entry("pageSize", 5));
assertThat(query.urlParams()).includes(entry("pageIndex", 4));
+ assertThat(query.urlParams()).includes(entry("ignorePaging", true));
}
@Test