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 /tests | |
parent | 4889f6cea0b2b0cc8d2b043de68a25b2aec2442e (diff) | |
download | sonarqube-a93fdfcffa23c125376d3e1f9e2e4abbc6b61a19.tar.gz sonarqube-a93fdfcffa23c125376d3e1f9e2e4abbc6b61a19.zip |
SONAR-10134 Add organization parameter in quality gates wsclient
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateUiTest.java | 9 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateUiTest.java | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateUiTest.java b/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateUiTest.java index 37cd43aa4cc..0262c9d68bc 100644 --- a/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateUiTest.java +++ b/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateUiTest.java @@ -55,11 +55,14 @@ public class OrganizationQualityGateUiTest { private Users.CreateWsResponse.User gateAdmin; @Before - public void setUp() throws Exception { + public void setUp() { organization = tester.organizations().generate(); gateAdmin = tester.users().generate(); - tester.organizations().addMember(tester.organizations().getDefaultOrganization(), gateAdmin); - tester.wsClient().permissions().addUser(new AddUserRequest().setLogin(gateAdmin.getLogin()).setPermission("gateadmin")); + tester.organizations().addMember(organization, gateAdmin); + tester.wsClient().permissions().addUser(new AddUserRequest() + .setOrganization(organization.getKey()) + .setLogin(gateAdmin.getLogin()) + .setPermission("gateadmin")); user = tester.users().generate(); tester.organizations().addMember(organization, user); restoreProfile(orchestrator, getClass().getResource("/issue/with-many-rules.xml"), organization.getKey()); diff --git a/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateUiTest.java b/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateUiTest.java index 859f6b479fc..279c5a438de 100644 --- a/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateUiTest.java +++ b/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateUiTest.java @@ -56,7 +56,7 @@ public class QualityGateUiTest { .disableOrganizations(); @Before - public void initPeriod() throws Exception { + public void initPeriod() { tester.settings().setGlobalSettings("sonar.leak.period", "previous_version"); } |