diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-11-23 16:14:40 +0100 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-11-29 20:24:11 +0100 |
commit | a1629c2cc959c72932c0d483457005de8dc55ad0 (patch) | |
tree | 3b597c09b845d582f71f9ef8ef05db1883faae0b /server/sonar-qa-util/src | |
parent | b8d9ebc1a94519ab3a0f285945c894b31de05c9a (diff) | |
download | sonarqube-a1629c2cc959c72932c0d483457005de8dc55ad0.tar.gz sonarqube-a1629c2cc959c72932c0d483457005de8dc55ad0.zip |
Generate client of api/qualitygates and api/roots
Diffstat (limited to 'server/sonar-qa-util/src')
-rw-r--r-- | server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QGateTester.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QGateTester.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QGateTester.java index 5db54abe49f..66ef0f036db 100644 --- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QGateTester.java +++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QGateTester.java @@ -25,7 +25,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.sonarqube.ws.Projects.CreateWsResponse.Project; -import org.sonarqube.ws.Qualitygates.CreateWsResponse; +import org.sonarqube.ws.Qualitygates; import org.sonarqube.ws.client.GetRequest; import org.sonarqube.ws.client.PostRequest; import org.sonarqube.ws.client.qualitygates.CreateRequest; @@ -53,12 +53,12 @@ public class QGateTester { .forEach(qualityGate -> session.wsClient().wsConnector().call(new PostRequest("api/qualitygates/destroy").setParam("id", qualityGate.getId())).failIfNotSuccessful()); } - public CreateWsResponse generate() { + public Qualitygates.CreateResponse generate() { int id = ID_GENERATOR.getAndIncrement(); return session.wsClient().qualityGates().create(new CreateRequest().setName("QualityGate" + id)); } - public void associateProject(CreateWsResponse qualityGate, Project project){ + public void associateProject(Qualitygates.CreateResponse qualityGate, Project project){ service().select(new SelectRequest().setGateId(String.valueOf(qualityGate.getId())).setProjectKey(project.getKey())); } |