Skip to content

Commit

Permalink
fix: error substring assertion for when the slug is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Jul 7, 2023
1 parent 4ed2088 commit ea194d8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions internal/commands/find_stemcell_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
)

const (
ErrStemcellOSInfoMustBeValid = "stemcell os information is missing or invalid"
ErrStemcellMajorVersionMustBeValid = "stemcell major Version is missing or invalid"
TanzuNetRemotePath = "network.pivotal.io"
)
Expand Down Expand Up @@ -57,10 +56,6 @@ func (cmd FindStemcellVersion) Execute(args []string) error {
return err
}

if productSlug == "" {
return fmt.Errorf(ErrStemcellOSInfoMustBeValid)
}

if kilnfile.Stemcell.Version == "" {
return fmt.Errorf(ErrStemcellMajorVersionMustBeValid)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/find_stemcell_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ release_sources:
})
It("returns the stemcell os info missing error message", func() {
Expect(executeErr).To(HaveOccurred())
Expect(executeErr).To(MatchError(ContainSubstring(commands.ErrStemcellOSInfoMustBeValid)))
Expect(executeErr).To(MatchError(ContainSubstring("stemcell slug not set")))
})
})

Expand Down

0 comments on commit ea194d8

Please sign in to comment.