From 390c9ba41981724d80d2be2fcb6a43dd6e3d6792 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Thu, 24 Oct 2024 15:40:07 +0200 Subject: [PATCH] chore: switch CLI download strategy (#209) --- .../snyk/eclipse/plugin/properties/preferences/Preferences.java | 2 +- .../io/snyk/languageserver/download/LsDownloadRequestTest.java | 2 +- .../snyk/languageserver/download/LsShaDownloadRequestTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/snyk/eclipse/plugin/properties/preferences/Preferences.java b/plugin/src/main/java/io/snyk/eclipse/plugin/properties/preferences/Preferences.java index 4b035b6f..25b3d33a 100644 --- a/plugin/src/main/java/io/snyk/eclipse/plugin/properties/preferences/Preferences.java +++ b/plugin/src/main/java/io/snyk/eclipse/plugin/properties/preferences/Preferences.java @@ -105,7 +105,7 @@ public static synchronized Preferences getInstance(PreferenceStore store) { } if (getPref(CLI_BASE_URL) == null || getPref(CLI_BASE_URL).isBlank()) { - store(CLI_BASE_URL, "https://static.snyk.io"); + store(CLI_BASE_URL, "https://downloads.snyk.io"); } if (getPref(SCANNING_MODE_AUTOMATIC) == null) { diff --git a/tests/src/test/java/io/snyk/languageserver/download/LsDownloadRequestTest.java b/tests/src/test/java/io/snyk/languageserver/download/LsDownloadRequestTest.java index e30be9ec..50be8cab 100644 --- a/tests/src/test/java/io/snyk/languageserver/download/LsDownloadRequestTest.java +++ b/tests/src/test/java/io/snyk/languageserver/download/LsDownloadRequestTest.java @@ -21,7 +21,7 @@ void shouldDownloadFromGithubWithOsDetectionByDefault() throws URISyntaxExceptio LsDownloadRequest cut = new LsDownloadRequest(version, environment); URI expectedUri = new URI( - "https://static.snyk.io/cli/v" + version + "/" + binary); + "https://downloads.snyk.io/cli/v" + version + "/" + binary); assertEquals(expectedUri, cut.getURI()); verify(environment).getDownloadBinaryName(); } diff --git a/tests/src/test/java/io/snyk/languageserver/download/LsShaDownloadRequestTest.java b/tests/src/test/java/io/snyk/languageserver/download/LsShaDownloadRequestTest.java index 198359c1..409e0b43 100644 --- a/tests/src/test/java/io/snyk/languageserver/download/LsShaDownloadRequestTest.java +++ b/tests/src/test/java/io/snyk/languageserver/download/LsShaDownloadRequestTest.java @@ -18,7 +18,7 @@ void shouldDownloadFromSnyk() throws URISyntaxException { LsShaRequest cut = new LsShaRequest(version); - URI expectedUri = new URI("https://static.snyk.io/cli/v" + version + URI expectedUri = new URI("https://downloads.snyk.io/cli/v" + version + "/sha256sums.txt.asc"); assertEquals(expectedUri, cut.getURI()); }