From b6ae91a0042f65be4d7860f0d7fbd7763e268408 Mon Sep 17 00:00:00 2001 From: JT Archie Date: Fri, 26 Apr 2019 10:35:50 -0600 Subject: [PATCH] update error message for when there are no stemcells to assign --- commands/assign_multi_stemcell.go | 2 +- commands/assign_multi_stemcell_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/assign_multi_stemcell.go b/commands/assign_multi_stemcell.go index 9134d9688..36cc6d91f 100644 --- a/commands/assign_multi_stemcell.go +++ b/commands/assign_multi_stemcell.go @@ -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. diff --git a/commands/assign_multi_stemcell_test.go b/commands/assign_multi_stemcell_test.go index 5374ca24b..4a3364c30 100644 --- a/commands/assign_multi_stemcell_test.go +++ b/commands/assign_multi_stemcell_test.go @@ -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))