diff options
author | Daniel Schwarz <daniel.schwarz@sonarsource.com> | 2017-11-30 11:24:21 +0100 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-12-06 14:40:17 +0100 |
commit | c84c9ce7619fc312374583ccd8510024a5b1c75c (patch) | |
tree | 82c153303f4fea96cdac6941d4f9f5236d719b36 /server/sonar-qa-util | |
parent | 90bce89957539918e4f10e44e94ff3b8aa920995 (diff) | |
download | sonarqube-c84c9ce7619fc312374583ccd8510024a5b1c75c.tar.gz sonarqube-c84c9ce7619fc312374583ccd8510024a5b1c75c.zip |
Deprecate old service classes in WsClient, add replacement methods
Diffstat (limited to 'server/sonar-qa-util')
3 files changed, 7 insertions, 7 deletions
diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/OrganizationTester.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/OrganizationTester.java index f38dbde22e8..85a9c8da5aa 100644 --- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/OrganizationTester.java +++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/OrganizationTester.java @@ -136,6 +136,6 @@ public class OrganizationTester { } public OrganizationService service() { - return session.wsClient().organizations(); + return session.wsClient().organizationsOld(); } } diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QProfileTester.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QProfileTester.java index 38e81ca6769..c28530f86de 100644 --- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QProfileTester.java +++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QProfileTester.java @@ -50,7 +50,7 @@ public class QProfileTester { } public QualityProfilesService service() { - return session.wsClient().qualityProfiles(); + return session.wsClient().qualityProfilesOld(); } @SafeVarargs diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/UserTester.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/UserTester.java index 9445767c8f1..af434c5d2ac 100644 --- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/UserTester.java +++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/UserTester.java @@ -74,7 +74,7 @@ public class UserTester { @SafeVarargs public final User generateAdministrator(Consumer<CreateRequest.Builder>... populators) { User user = generate(populators); - session.wsClient().permissions().addUser(new org.sonarqube.ws.client.permission.AddUserRequest().setLogin(user.getLogin()).setPermission("admin")); + session.wsClient().permissionsOld().addUser(new org.sonarqube.ws.client.permission.AddUserRequest().setLogin(user.getLogin()).setPermission("admin")); session.wsClient().userGroups().addUser(new AddUserRequest().setLogin(user.getLogin()).setName("sonar-administrators")); return user; } @@ -83,7 +83,7 @@ public class UserTester { public final User generateAdministrator(Organizations.Organization organization, Consumer<CreateRequest.Builder>... populators) { String organizationKey = organization.getKey(); User user = generate(populators); - session.wsClient().organizations().addMember(organizationKey, user.getLogin()); + session.wsClient().organizationsOld().addMember(organizationKey, user.getLogin()); session.wsClient().userGroups().addUser(new AddUserRequest() .setOrganization(organizationKey) .setLogin(user.getLogin()) @@ -94,7 +94,7 @@ public class UserTester { @SafeVarargs public final User generateAdministratorOnDefaultOrganization(Consumer<CreateRequest.Builder>... populators) { User user = generate(populators); - session.wsClient().organizations().addMember(DEFAULT_ORGANIZATION_KEY, user.getLogin()); + session.wsClient().organizationsOld().addMember(DEFAULT_ORGANIZATION_KEY, user.getLogin()); session.wsClient().userGroups().addUser(new AddUserRequest() .setOrganization(DEFAULT_ORGANIZATION_KEY) .setLogin(user.getLogin()) @@ -105,14 +105,14 @@ public class UserTester { @SafeVarargs public final User generateMember(Organizations.Organization organization, Consumer<CreateRequest.Builder>... populators) { User user = generate(populators); - session.wsClient().organizations().addMember(organization.getKey(), user.getLogin()); + session.wsClient().organizationsOld().addMember(organization.getKey(), user.getLogin()); return user; } @SafeVarargs public final User generateMemberOfDefaultOrganization(Consumer<CreateRequest.Builder>... populators) { User user = generate(populators); - session.wsClient().organizations().addMember(DEFAULT_ORGANIZATION_KEY, user.getLogin()); + session.wsClient().organizationsOld().addMember(DEFAULT_ORGANIZATION_KEY, user.getLogin()); return user; } |