Skip to content

Commit

Permalink
Merge pull request #191 from carolynvs/fix-build
Browse files Browse the repository at this point in the history
Fix build
  • Loading branch information
rgbkrk authored Dec 31, 2018
2 parents b5c28c8 + aed82cf commit 0d08443
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ validate:
-go list ./... | grep -v /vendor/ | xargs -L1 golint --set_exit_status

test: local
go test $(GOFILES_NOVENDOR)
go test -v $(GOFILES_NOVENDOR)
eval "$( ./dvm-helper --bash-completion )"
./dvm-helper/dvm-helper --version

Expand Down
6 changes: 6 additions & 0 deletions dvm-helper/dockerversion/dockerversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,25 +132,31 @@ func TestVersion_BuildDownloadURL(t *testing.T) {
},

// original download location, without compression, prerelease
/* test.docker.com has been removed by docker
Parse("1.10.0-rc1"): {
wantURL: fmt.Sprintf("https://test.docker.com/builds/%s/%s/docker-1.10.0-rc1", dockerOS, dockerArch),
wantArchived: false,
wantChecksum: true,
},
*/

// compressed binaries
/* test.docker.com has been removed by docker
Parse("1.11.0-rc1"): {
wantURL: fmt.Sprintf("https://test.docker.com/builds/%s/%s/docker-1.11.0-rc1.tgz", dockerOS, dockerArch),
wantArchived: true,
wantChecksum: true,
},
*/

// original version scheme, prerelease binaries
/* test.docker.com has been removed by docker
Parse("1.13.0-rc1"): {
wantURL: fmt.Sprintf("https://test.docker.com/builds/%s/%s/docker-1.13.0-rc1.tgz", dockerOS, dockerArch),
wantArchived: true,
wantChecksum: true,
},
*/

// yearly notation, original download location, release location
Parse("17.03.0-ce"): {
Expand Down
2 changes: 1 addition & 1 deletion dvm-helper/dvm-helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ func listLegacyDockerVersions() ([]dockerversion.Version, error) {
}
allReleases = append(allReleases, releases...)
if response.StatusCode != 200 {
return nil, errors.Errorf("Unable to retrieve list of Docker releases from GitHub (Status %s).", response.StatusCode)
return nil, errors.Errorf("Unable to retrieve list of Docker releases from GitHub (Status %v).", response.StatusCode)
}
if response.NextPage == 0 {
break
Expand Down
4 changes: 2 additions & 2 deletions dvm-helper/dvm-helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ func TestInstallPrereleases(t *testing.T) {
color.Output = outputCapture

dvm := makeCliApp()
dvm.Run([]string{"dvm-helper", "--debug", "install", "1.12.5-rc1"})
dvm.Run([]string{"dvm-helper", "--debug", "install", "18.06.1-ce"})

output := outputCapture.String()
assert.NotEmpty(t, output, "Should have captured stdout")
assert.Contains(t, output, "Now using Docker 1.12.5-rc1", "Should have installed a prerelease version")
assert.Contains(t, output, "Now using Docker 18.06.1-ce", "Should have installed a prerelease version")
}

// install a version from the test location that is missing the -rc suffix
Expand Down

0 comments on commit 0d08443

Please sign in to comment.