diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2017-06-01 15:09:31 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2017-06-01 15:09:31 +0200 |
commit | 5f4d94c8d199701821b1cdcad108b55b63265dc2 (patch) | |
tree | 32e44ff0f3a878d5baf971ff27c70639f3c8a3d7 /sonar-ws/src/test | |
parent | 91bba8795fdc751ee233e6796f302a0449cf8d85 (diff) | |
download | sonarqube-5f4d94c8d199701821b1cdcad108b55b63265dc2.tar.gz sonarqube-5f4d94c8d199701821b1cdcad108b55b63265dc2.zip |
Revert "SONAR-9301 Support HTTP redirect on scanner side"
This reverts commit ae7c09e3fb13a881cebb88a84aae7f983e90e8a1.
Diffstat (limited to 'sonar-ws/src/test')
-rw-r--r-- | sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java index 3cad8d93ff8..ba6e9d4dc43 100644 --- a/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java +++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java @@ -20,7 +20,6 @@ package org.sonarqube.ws.client; import java.io.File; -import java.io.IOException; import java.net.InetSocketAddress; import java.net.Proxy; import java.util.List; @@ -64,31 +63,6 @@ public class HttpConnectorTest { } @Test - public void follow_redirects_post() throws IOException, InterruptedException { - MockWebServer server2 = new MockWebServer(); - server2.start(); - server2.url("").url().toString(); - - server.enqueue(new MockResponse() - .setResponseCode(302) - .setHeader("Location", server2.url("").url().toString())); - - server2.enqueue(new MockResponse() - .setResponseCode(200)); - - underTest = HttpConnector.newBuilder().url(serverUrl).build(); - PostRequest request = new PostRequest("api/ce/submit").setParam("projectKey", "project"); - WsResponse response = underTest.call(request); - - RecordedRequest recordedRequest = server2.takeRequest(); - - assertThat(recordedRequest.getMethod()).isEqualTo("POST"); - assertThat(recordedRequest.getBody().readUtf8()).isEqualTo("projectKey=project"); - assertThat(response.requestUrl()).isEqualTo(server2.url("").url().toString()); - assertThat(response.code()).isEqualTo(200); - } - - @Test public void test_default_settings() throws Exception { answerHelloWorld(); underTest = HttpConnector.newBuilder().url(serverUrl).build(); |