Skip to content

Commit

Permalink
Update url to prevent tests from failing (arduino#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoPologruto authored Dec 16, 2022
1 parent b6cc517 commit 62b4493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arduino/resources/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions internal/integrationtest/core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 62b4493

Please sign in to comment.