Unverified Commit 62b44936 authored by MatteoPologruto's avatar MatteoPologruto Committed by GitHub

Update url to prevent tests from failing (#2013)

parent b6cc517d
...@@ -42,7 +42,7 @@ func TestDownloadAndChecksums(t *testing.T) { ...@@ -42,7 +42,7 @@ func TestDownloadAndChecksums(t *testing.T) {
CachePath: "cache", CachePath: "cache",
Checksum: "SHA-256:6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092", Checksum: "SHA-256:6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092",
Size: 486, 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") digest, err := hex.DecodeString("6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092")
require.NoError(t, err) require.NoError(t, err)
......
...@@ -162,7 +162,7 @@ func TestCoreSearchNoArgs(t *testing.T) { ...@@ -162,7 +162,7 @@ func TestCoreSearchNoArgs(t *testing.T) {
lines = append(lines, strings.Fields(strings.TrimSpace(v))) lines = append(lines, strings.Fields(strings.TrimSpace(v)))
} }
// The header is printed on the first lines // 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 numPlatforms := len(lines) - 1
// same thing in JSON format, also check the number of platforms found is the same // same thing in JSON format, also check the number of platforms found is the same
...@@ -179,7 +179,7 @@ func TestCoreSearchNoArgs(t *testing.T) { ...@@ -179,7 +179,7 @@ func TestCoreSearchNoArgs(t *testing.T) {
lines = append(lines, strings.Fields(strings.TrimSpace(v))) lines = append(lines, strings.Fields(strings.TrimSpace(v)))
} }
// The header is printed on the first lines // 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 numPlatforms = len(lines) - 1
// same thing in JSON format, also check the number of platforms found is the same // same thing in JSON format, also check the number of platforms found is the same
...@@ -385,7 +385,7 @@ func TestCoreZipslip(t *testing.T) { ...@@ -385,7 +385,7 @@ func TestCoreZipslip(t *testing.T) {
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
defer env.CleanUp() 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) _, _, err := cli.Run("core", "update-index", "--additional-urls="+url)
require.NoError(t, err) require.NoError(t, err)
...@@ -399,7 +399,7 @@ func TestCoreBrokenInstall(t *testing.T) { ...@@ -399,7 +399,7 @@ func TestCoreBrokenInstall(t *testing.T) {
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
defer env.CleanUp() 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) _, _, err := cli.Run("core", "update-index", "--additional-urls="+url)
require.NoError(t, err) require.NoError(t, err)
_, _, err = cli.Run("core", "install", "brokenchecksum:x86", "--additional-urls="+url) _, _, err = cli.Run("core", "install", "brokenchecksum:x86", "--additional-urls="+url)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment