]> source.dussan.org Git - sonarqube.git/commitdiff
Fix IT that shouldn't use organization
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 26 Mar 2018 14:39:31 +0000 (16:39 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 4 Apr 2018 06:49:17 +0000 (08:49 +0200)
tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateTest.java

index 75e6a8976545c6dc1209ba6b8ec643796a857e5c..be6d5abed102aa638b509f5f5f917b960c3f2aa3 100644 (file)
@@ -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