From 124aaa43b6f65bee01c167d2bceb8c71f58fc06a Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 26 Mar 2018 16:39:31 +0200 Subject: [PATCH] Fix IT that shouldn't use organization --- .../org/sonarqube/tests/qualityGate/QualityGateTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateTest.java b/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateTest.java index 75e6a897654..be6d5abed10 100644 --- a/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateTest.java +++ b/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateTest.java @@ -46,7 +46,6 @@ import org.sonarqube.tests.Category1Suite; import org.sonarqube.tests.Session; import org.sonarqube.tests.Tester; import org.sonarqube.ws.MediaTypes; -import org.sonarqube.ws.Organizations.Organization; import org.sonarqube.ws.WsCe; import org.sonarqube.ws.WsMeasures.Measure; import org.sonarqube.ws.WsProjects.CreateWsResponse.Project; @@ -290,9 +289,8 @@ public class QualityGateTest { @Test public void administrate_quality_gate_with_gateadmin_permission() { // user is quality gate admin of default organization - Organization organization = tester.organizations().getDefaultOrganization(); - WsUsers.CreateWsResponse.User user = tester.users().generateMember(organization); - tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(user.getLogin()).setPermission("gateadmin").setOrganization(organization.getKey())); + WsUsers.CreateWsResponse.User user = tester.users().generate(); + tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(user.getLogin()).setPermission("gateadmin")); Session qGateAdminTester = tester.as(user.getLogin()); QualityGatesService qGateService = qGateAdminTester.qGates().service(); // perform administration operations -- 2.39.5