From 3f9038d37914bf973701e6f2c5c8fa980c451a0a Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 8 Sep 2016 11:32:11 +0200 Subject: [PATCH] SONAR-7970 SONAR-7986 Use new api/settings WS in ITs --- it/it-tests/src/test/java/util/ItUtils.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/it/it-tests/src/test/java/util/ItUtils.java b/it/it-tests/src/test/java/util/ItUtils.java index 9c00d48c63b..477e1aca89a 100644 --- a/it/it-tests/src/test/java/util/ItUtils.java +++ b/it/it-tests/src/test/java/util/ItUtils.java @@ -50,12 +50,11 @@ import org.sonar.wsclient.base.HttpException; import org.sonar.wsclient.issue.Issue; import org.sonar.wsclient.issue.IssueClient; import org.sonar.wsclient.issue.IssueQuery; -import org.sonar.wsclient.services.PropertyDeleteQuery; -import org.sonar.wsclient.services.PropertyUpdateQuery; import org.sonarqube.ws.client.HttpConnector; import org.sonarqube.ws.client.WsClient; import org.sonarqube.ws.client.WsClientFactories; import org.sonarqube.ws.client.setting.ResetRequest; +import org.sonarqube.ws.client.setting.SetRequest; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.FluentIterable.from; @@ -213,9 +212,9 @@ public class ItUtils { public static void setServerProperty(Orchestrator orchestrator, @Nullable String componentKey, String key, @Nullable String value) { if (value == null) { - orchestrator.getServer().getAdminWsClient().delete(new PropertyDeleteQuery(key).setResourceKeyOrId(componentKey)); + newAdminWsClient(orchestrator).settingsService().reset(ResetRequest.builder().setKeys(key).setComponentKey(componentKey).build()); } else { - orchestrator.getServer().getAdminWsClient().update(new PropertyUpdateQuery().setKey(key).setResourceKeyOrId(componentKey).setValue(value)); + newAdminWsClient(orchestrator).settingsService().set(SetRequest.builder().setKey(key).setValue(value).setComponentKey(componentKey).build()); } } -- 2.39.5