Skip to content

[skip-changelog] Update urls to prevent tests from failing #2013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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