diff options
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(); |