From 62b44936368fa8cf4689cdeef81ac32fdae077bf Mon Sep 17 00:00:00 2001 From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> Date: Fri, 16 Dec 2022 15:42:00 +0100 Subject: [PATCH] Update url to prevent tests from failing (#2013) --- arduino/resources/resources_test.go | 2 +- internal/integrationtest/core/core_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arduino/resources/resources_test.go b/arduino/resources/resources_test.go index b4af710d610..aca93293f56 100644 --- a/arduino/resources/resources_test.go +++ b/arduino/resources/resources_test.go @@ -42,7 +42,7 @@ func TestDownloadAndChecksums(t *testing.T) { CachePath: "cache", Checksum: "SHA-256:6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092", Size: 486, - URL: "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/core.zip", + URL: "https://raw.githubusercontent.com/arduino/arduino-cli/master/internal/integrationtest/testdata/core.zip", } digest, err := hex.DecodeString("6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092") require.NoError(t, err) diff --git a/internal/integrationtest/core/core_test.go b/internal/integrationtest/core/core_test.go index a11ea269d03..16ac2e4fc3b 100644 --- a/internal/integrationtest/core/core_test.go +++ b/internal/integrationtest/core/core_test.go @@ -162,7 +162,7 @@ func TestCoreSearchNoArgs(t *testing.T) { lines = append(lines, strings.Fields(strings.TrimSpace(v))) } // The header is printed on the first lines - require.Equal(t, []string{"test:x86", "2.0.0", "test_core"}, lines[19]) + require.Equal(t, []string{"test:x86", "2.0.0", "test_core"}, lines[20]) numPlatforms := len(lines) - 1 // same thing in JSON format, also check the number of platforms found is the same @@ -179,7 +179,7 @@ func TestCoreSearchNoArgs(t *testing.T) { lines = append(lines, strings.Fields(strings.TrimSpace(v))) } // The header is printed on the first lines - require.Equal(t, []string{"test:x86", "2.0.0", "test_core"}, lines[20]) + require.Equal(t, []string{"test:x86", "2.0.0", "test_core"}, lines[21]) numPlatforms = len(lines) - 1 // same thing in JSON format, also check the number of platforms found is the same @@ -385,7 +385,7 @@ func TestCoreZipslip(t *testing.T) { env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) defer env.CleanUp() - url := "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/test_index.json" + url := "https://raw.githubusercontent.com/arduino/arduino-cli/master/internal/integrationtest/testdata/test_index.json" _, _, err := cli.Run("core", "update-index", "--additional-urls="+url) require.NoError(t, err) @@ -399,7 +399,7 @@ func TestCoreBrokenInstall(t *testing.T) { env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) defer env.CleanUp() - url := "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/test_index.json" + url := "https://raw.githubusercontent.com/arduino/arduino-cli/master/internal/integrationtest/testdata/test_index.json" _, _, err := cli.Run("core", "update-index", "--additional-urls="+url) require.NoError(t, err) _, _, err = cli.Run("core", "install", "brokenchecksum:x86", "--additional-urls="+url)