aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-07-05 17:42:43 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-07-17 10:52:47 +0200
commit0839c4ba9cf741764c885ce6ba544bc6b1a82410 (patch)
tree8457fc50f7b0dce1b1ac80389fd51b3700cb6739 /tests/src
parent20873ba1d51089dce84bf6f3e115564adde4e721 (diff)
downloadsonarqube-0839c4ba9cf741764c885ce6ba544bc6b1a82410.tar.gz
sonarqube-0839c4ba9cf741764c885ce6ba544bc6b1a82410.zip
SONAR-9508 Create api/ce/worker_count WS
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/test/java/org/sonarqube/tests/ce/WorkerCountTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/ce/WorkerCountTest.java b/tests/src/test/java/org/sonarqube/tests/ce/WorkerCountTest.java
index c5c63bde250..3a8e766953d 100644
--- a/tests/src/test/java/org/sonarqube/tests/ce/WorkerCountTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/ce/WorkerCountTest.java
@@ -27,8 +27,11 @@ import java.util.Set;
import java.util.stream.Collectors;
import org.junit.After;
import org.junit.Test;
+import org.sonarqube.ws.WsCe.WorkerCountResponse;
+import static java.lang.Integer.parseInt;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newAdminWsClient;
import static util.ItUtils.pluginArtifact;
public class WorkerCountTest {
@@ -58,5 +61,9 @@ public class WorkerCountTest {
assertThat(line)
.hasSize(1);
assertThat(line.iterator().next()).contains(workerCount);
+
+ assertThat(newAdminWsClient(orchestrator).ce().workerCount())
+ .extracting(WorkerCountResponse::getValue, WorkerCountResponse::getCanSetWorkerCount)
+ .containsOnly(parseInt(workerCount), true);
}
}