From 5f4d94c8d199701821b1cdcad108b55b63265dc2 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 1 Jun 2017 15:09:31 +0200 Subject: Revert "SONAR-9301 Support HTTP redirect on scanner side" This reverts commit ae7c09e3fb13a881cebb88a84aae7f983e90e8a1. --- .../org/sonarqube/ws/client/HttpConnectorTest.java | 26 ---------------------- 1 file changed, 26 deletions(-) (limited to 'sonar-ws/src/test') 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; @@ -63,31 +62,6 @@ public class HttpConnectorTest { serverUrl = server.url("").url().toString(); } - @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(); -- cgit v1.2.3