-
-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not fail if downloaded file has good checksum but incorrect size. (#…
…2739) * Do not fail download if archive size do not match package_index.json size (checksum is sufficient) * Added unit tests * Added integration test
- Loading branch information
Showing
3 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1354,3 +1354,15 @@ func TestReferencedCoreBuildAndRuntimeProperties(t *testing.T) { | |
out.ArrayMustContain(jsonEncode("runtime.platform.path=" + corePlatformPath)) | ||
} | ||
} | ||
|
||
func TestCoreInstallWithWrongArchiveSize(t *testing.T) { | ||
// See: https://github.com/arduino/arduino-cli/issues/2332 | ||
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) | ||
defer env.CleanUp() | ||
|
||
_, _, err := cli.Run("--additional-urls", "https://raw.githubusercontent.com/geolink/opentracker-arduino-board/bf6158ebab0402db217bfb02ea61461ddc6f2940/package_opentracker_index.json", "core", "update-index") | ||
require.NoError(t, err) | ||
|
||
_, _, err = cli.Run("--additional-urls", "https://raw.githubusercontent.com/geolink/opentracker-arduino-board/bf6158ebab0402db217bfb02ea61461ddc6f2940/package_opentracker_index.json", "core", "install", "opentracker:[email protected]") | ||
require.NoError(t, err) | ||
} |