diff options
author | Daniel Schwarz <daniel.schwarz@sonarsource.com> | 2017-11-23 15:32:45 +0100 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-11-23 16:53:42 +0100 |
commit | 818a1ed6d1a180adc065b7aac6214255c4e7576b (patch) | |
tree | d1eb8f45cb8657a6d2282131d18db487eb0dad50 | |
parent | 2212889ad505b5f5dc516fd60de41b61fa05364c (diff) | |
download | sonarqube-818a1ed6d1a180adc065b7aac6214255c4e7576b.tar.gz sonarqube-818a1ed6d1a180adc065b7aac6214255c4e7576b.zip |
SONAR-10119 Set default page size of api/organizations/search to 100
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java | 2 | ||||
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/organization/ws/SearchActionTest.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java index 26383c15dec..cdafe498a10 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java @@ -67,7 +67,7 @@ public class SearchAction implements OrganizationsWsAction { .setRequired(false) .setSince("6.3"); - action.addPagingParams(25); + action.addPagingParams(100); } @Override diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/SearchActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/SearchActionTest.java index a638eeb8bce..1ccaad72e78 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/SearchActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/SearchActionTest.java @@ -95,7 +95,7 @@ public class SearchActionTest { assertThat(pParam.description()).isEqualTo("1-based page number"); WebService.Param psParam = action.param("ps"); assertThat(psParam.isRequired()).isFalse(); - assertThat(psParam.defaultValue()).isEqualTo("25"); + assertThat(psParam.defaultValue()).isEqualTo("100"); assertThat(psParam.description()).isEqualTo("Page size. Must be greater than 0."); } @@ -116,7 +116,7 @@ public class SearchActionTest { .setName("Foo Company") .setGuarded(true)); - String response = executeJsonRequest(null, null); + String response = executeJsonRequest(null, 25); assertJson(response).isSimilarTo(wsTester.getDef().responseExampleAsString()); } @@ -224,7 +224,7 @@ public class SearchActionTest { response = executeRequest(null, null); assertThat(response.getOrganizationsList()).extracting(Organization::getKey).hasSize(5); - assertThat(response.getPaging()).extracting(Paging::getPageIndex, Paging::getPageSize, Paging::getTotal).containsOnly(1, 25, 5); + assertThat(response.getPaging()).extracting(Paging::getPageIndex, Paging::getPageSize, Paging::getTotal).containsOnly(1, 100, 5); } @Test |