diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2017-12-12 13:59:38 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2017-12-14 17:03:35 +0100 |
commit | a93fdfcffa23c125376d3e1f9e2e4abbc6b61a19 (patch) | |
tree | 7490954aa28615000d3c80dc2085395531a0ed37 /server/sonar-qa-util | |
parent | 4889f6cea0b2b0cc8d2b043de68a25b2aec2442e (diff) | |
download | sonarqube-a93fdfcffa23c125376d3e1f9e2e4abbc6b61a19.tar.gz sonarqube-a93fdfcffa23c125376d3e1f9e2e4abbc6b61a19.zip |
SONAR-10134 Add organization parameter in quality gates wsclient
Diffstat (limited to 'server/sonar-qa-util')
-rw-r--r-- | server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QGateTester.java | 5 |
1 files changed, 3 insertions, 2 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 87eeca9a8da..3383f355d09 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 @@ -28,6 +28,7 @@ import java.util.stream.Collectors; import org.sonarqube.ws.Projects.CreateWsResponse.Project; import org.sonarqube.ws.client.qualitygates.CreateRequest; import org.sonarqube.ws.client.qualitygates.DestroyRequest; +import org.sonarqube.ws.client.qualitygates.ListRequest; import org.sonarqube.ws.client.qualitygates.QualitygatesService; import org.sonarqube.ws.client.qualitygates.SelectRequest; import org.sonarqube.ws.client.qualitygates.SetAsDefaultRequest; @@ -49,13 +50,13 @@ public class QGateTester { } void deleteAll() { - List<ListWsResponse.QualityGate> builtInQualityGates = session.wsClient().qualitygates().list().getQualitygatesList().stream() + List<ListWsResponse.QualityGate> builtInQualityGates = session.wsClient().qualitygates().list(new ListRequest()).getQualitygatesList().stream() .filter(ListWsResponse.QualityGate::getIsBuiltIn) .collect(Collectors.toList()); if (builtInQualityGates.size() == 1) { session.wsClient().qualitygates().setAsDefault(new SetAsDefaultRequest().setId(Long.toString(builtInQualityGates.get(0).getId()))); } - session.wsClient().qualitygates().list().getQualitygatesList().stream() + session.wsClient().qualitygates().list(new ListRequest()).getQualitygatesList().stream() .filter(qualityGate -> !qualityGate.getIsDefault()) .filter(qualityGate -> !qualityGate.getIsBuiltIn()) .forEach(qualityGate -> session.wsClient().qualitygates().destroy(new DestroyRequest().setId(Long.toString(qualityGate.getId())))); |