diff --git a/common/step_download.go b/common/step_download.go index 39d82964d..4351e29c2 100644 --- a/common/step_download.go +++ b/common/step_download.go @@ -105,8 +105,6 @@ func (s *StepDownload) download(ctx context.Context, ui packer.Ui, source string q := u.Query() q.Set("checksum", s.Checksum) u.RawQuery = q.Encode() - } else if s.ChecksumType != "none" { - return "", fmt.Errorf("empty checksum, a checksum or a 'none' checksum type must be set") } targetPath := s.TargetPath diff --git a/common/step_download_test.go b/common/step_download_test.go index c824bd9dc..8a8df9960 100644 --- a/common/step_download_test.go +++ b/common/step_download_test.go @@ -63,10 +63,13 @@ func TestStepDownload_Run(t *testing.T) { want multistep.StepAction wantFiles []string }{ - {"not passing a checksum fails", + {"not passing a checksum passes", fields{Url: []string{abs(t, "./test-fixtures/root/another.txt")}}, - multistep.ActionHalt, - nil, + multistep.ActionContinue, + []string{ + toSha1(abs(t, "./test-fixtures/root/another.txt")), + toSha1(abs(t, "./test-fixtures/root/another.txt")) + ".lock", + }, }, {"none checksum works, without a checksum", fields{Url: []string{abs(t, "./test-fixtures/root/another.txt")}, ChecksumType: "none"},