diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-10-11 18:42:33 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-10-16 09:36:55 +0200 |
commit | 36e1afc3d93ab23b01bb3911d311f157ef8c8fb0 (patch) | |
tree | e18b1c6c4f0cdac1ca9219ec41147be7aae9df1a /tests | |
parent | bbec8759238610b63147422338ce4fdd23b53570 (diff) | |
download | sonarqube-36e1afc3d93ab23b01bb3911d311f157ef8c8fb0.tar.gz sonarqube-36e1afc3d93ab23b01bb3911d311f157ef8c8fb0.zip |
SONAR-9863 drop internal WS api/server_id and api/licenses
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemTest.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemTest.java b/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemTest.java index ac888b10998..3ac1c50cdfe 100644 --- a/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemTest.java +++ b/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemTest.java @@ -30,14 +30,9 @@ import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; -import org.sonarqube.pageobjects.Navigation; -import org.sonarqube.pageobjects.ServerIdPage; import org.sonarqube.tests.Category4Suite; import org.sonarqube.tests.Tester; -import org.sonarqube.ws.MediaTypes; -import org.sonarqube.ws.ServerId.ShowWsResponse; import org.sonarqube.ws.WsSystem; -import org.sonarqube.ws.client.GetRequest; import util.ItUtils; import static org.apache.commons.lang.StringUtils.startsWithAny; @@ -70,32 +65,6 @@ public class ServerSystemTest { } } - @Test - public void generate_server_id() throws IOException { - Navigation nav = tester.openBrowser().openHome().logIn().submitCredentials(ADMIN_USER_LOGIN); - String validIpAddress = getValidIpAddress(); - - nav.openServerId() - .setOrganization("Name with invalid chars like $") - .setIpAddress(validIpAddress) - .submitForm() - .assertError(); - - nav.openServerId() - .setOrganization("DEMO") - .setIpAddress("invalid_address") - .submitForm() - .assertError(); - - ServerIdPage page = nav.openServerId() - .setOrganization("DEMO") - .setIpAddress(validIpAddress) - .submitForm(); - - String serverId = page.serverIdInput().val(); - assertThat(serverId).isNotEmpty(); - } - /** * See http://jira.codehaus.org/browse/SONAR-2727 */ @@ -151,11 +120,4 @@ public class ServerSystemTest { assertThat(jsonAsMap.get("webServices")).isNotNull(); } - private String getValidIpAddress() throws IOException { - ShowWsResponse response = ShowWsResponse.parseFrom(tester.wsClient().wsConnector().call( - new GetRequest("api/server_id/show").setMediaType(MediaTypes.PROTOBUF)).contentStream()); - assertThat(response.getValidIpAddressesCount()).isGreaterThan(0); - return response.getValidIpAddresses(0); - } - } |