diff options
author | Wojtek Wajerowicz <115081248+wojciech-wajerowicz-sonarsource@users.noreply.github.com> | 2023-11-07 14:16:43 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-11-08 20:02:51 +0000 |
commit | 3c40fffa36a740785892e8963916b07b4a5faed5 (patch) | |
tree | 714de58d7cd7e06ee6847dfde646932b7e7b58c9 /server/sonar-server-common/src/test/java | |
parent | 6c525fc50c21c84015497eb31ab8ef47aece1e2e (diff) | |
download | sonarqube-3c40fffa36a740785892e8963916b07b4a5faed5.tar.gz sonarqube-3c40fffa36a740785892e8963916b07b4a5faed5.zip |
SONAR-20540 Use proxy settings in DefaultHttpDownloader
Diffstat (limited to 'server/sonar-server-common/src/test/java')
-rw-r--r-- | server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java index 671e21dbd1e..74d30b82651 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java @@ -35,6 +35,8 @@ import org.sonar.api.utils.Version; import org.sonar.core.platform.SonarQubeVersion; import static org.assertj.core.api.Assertions.assertThat; +import static org.sonar.core.config.ProxyProperties.HTTP_PROXY_PASSWORD; +import static org.sonar.core.config.ProxyProperties.HTTP_PROXY_USER; public class OkHttpClientProviderTest { @@ -60,8 +62,8 @@ public class OkHttpClientProviderTest { @Test public void get_returns_a_OkHttpClient_with_proxy_authentication() throws Exception { - settings.setProperty("http.proxyUser", "the-login"); - settings.setProperty("http.proxyPassword", "the-password"); + settings.setProperty(HTTP_PROXY_USER, "the-login"); + settings.setProperty(HTTP_PROXY_PASSWORD, "the-password"); OkHttpClient client = underTest.provide(settings.asConfig(), sonarQubeVersion); Response response = new Response.Builder().protocol(Protocol.HTTP_1_1).request(new Request.Builder().url("http://foo").build()).code(407) |