diff options
author | lukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com> | 2024-03-19 15:39:33 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-03-19 20:02:38 +0000 |
commit | 917a1f424307557ab9f6fbc2dcb1a8320774e511 (patch) | |
tree | 57d17709373e0da62038d15deae04116fc5eef50 /sonar-core | |
parent | f0217afa1856121b10c4a50d40b4038efb14b318 (diff) | |
download | sonarqube-917a1f424307557ab9f6fbc2dcb1a8320774e511.tar.gz sonarqube-917a1f424307557ab9f6fbc2dcb1a8320774e511.zip |
SONAR-21857 fix ssf
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/it/java/org/sonar/core/util/DefaultHttpDownloaderIT.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sonar-core/src/it/java/org/sonar/core/util/DefaultHttpDownloaderIT.java b/sonar-core/src/it/java/org/sonar/core/util/DefaultHttpDownloaderIT.java index 332fe10b57e..7aededcf286 100644 --- a/sonar-core/src/it/java/org/sonar/core/util/DefaultHttpDownloaderIT.java +++ b/sonar-core/src/it/java/org/sonar/core/util/DefaultHttpDownloaderIT.java @@ -33,8 +33,10 @@ import java.util.Properties; import java.util.zip.GZIPOutputStream; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; +import org.junit.Ignore; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; import org.junit.jupiter.api.io.TempDir; @@ -70,14 +72,6 @@ class DefaultHttpDownloaderIT { if (req.getPath().getPath().contains("/redirect/")) { resp.setCode(303); resp.setValue("Location", "/redirected"); - } else if (req.getPath().getPath().contains("/gzip/")) { - if (!"gzip".equals(req.getValue("Accept-Encoding"))) { - throw new IllegalStateException("Should accept gzip"); - } - resp.setValue("Content-Encoding", "gzip"); - GZIPOutputStream gzipOutputStream = new GZIPOutputStream(resp.getOutputStream()); - gzipOutputStream.write("GZIP response".getBytes()); - gzipOutputStream.close(); } else if (req.getPath().getPath().contains("/redirected")) { resp.getPrintStream().append("redirected"); } else if (req.getPath().getPath().contains("/error")) { @@ -154,12 +148,6 @@ class DefaultHttpDownloaderIT { } @Test - void readGzipString() throws URISyntaxException { - String text = new DefaultHttpDownloader(mock(Server.class), new MapSettings().asConfig()).readString(new URI(baseUrl + "/gzip/"), StandardCharsets.UTF_8); - assertThat(text).isEqualTo("GZIP response"); - } - - @Test void readStringWithDefaultTimeout() throws URISyntaxException { String text = new DefaultHttpDownloader(mock(Server.class), new MapSettings().asConfig()).readString(new URI(baseUrl + "/timeout/"), StandardCharsets.UTF_8); assertThat(text.length()).isGreaterThan(10); |