Skip to content

Commit

Permalink
update error message for when there are no stemcells to assign
Browse files Browse the repository at this point in the history
  • Loading branch information
JT Archie committed Apr 26, 2019
1 parent 92a2e1d commit b6ae91a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/assign_multi_stemcell.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (as *AssignMultiStemcell) validateStemcellVersion(productStemcell api.Produ
listOfStemcells := strings.Join(getStemcellsForOS(availableVersions, os), ", ")
if listOfStemcells == "" {
return nil, fmt.Errorf(`stemcell version %s for %s not found in Ops Manager.
there are no available stemcells to for "%s" choose from
there are no available stemcells to for "%s"
upload-stemcell, and try again`, version, os, as.Options.ProductName)
}
return nil, fmt.Errorf(`stemcell version %s for %s not found in Ops Manager.
Expand Down
2 changes: 1 addition & 1 deletion commands/assign_multi_stemcell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ stemcell: [ "ubuntu-trusty:1234.6", "ubuntu-xenial:latest" ]
err := command.Execute([]string{"--product", "cf", "--stemcell", "ubuntu-xenial:1234.5"})
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring(`stemcell version 1234.5 for ubuntu-xenial not found in Ops Manager.`))
Expect(err.Error()).To(ContainSubstring(`there are no available stemcells to for "cf" choose from`))
Expect(err.Error()).To(ContainSubstring(`there are no available stemcells to for "cf"`))
Expect(err.Error()).To(ContainSubstring("upload-stemcell, and try again"))

Expect(fakeService.ListMultiStemcellsCallCount()).To(Equal(1))
Expand Down

0 comments on commit b6ae91a

Please sign in to comment.