github.com/swisspost/terratest@v0.0.0-20230214120104-7ec6de2e1ae0/modules/helm/errors.go (about) 1 package helm 2 3 import ( 4 "fmt" 5 ) 6 7 // ValuesFileNotFoundError is returned when a provided values file input is not found on the host path. 8 type ValuesFileNotFoundError struct { 9 Path string 10 } 11 12 func (err ValuesFileNotFoundError) Error() string { 13 return fmt.Sprintf("Could not resolve values file %s", err.Path) 14 } 15 16 // SetFileNotFoundError is returned when a provided set file input is not found on the host path. 17 type SetFileNotFoundError struct { 18 Path string 19 } 20 21 func (err SetFileNotFoundError) Error() string { 22 return fmt.Sprintf("Could not resolve set file path %s", err.Path) 23 } 24 25 // TemplateFileNotFoundError is returned when a provided template file input is not found in the chart 26 type TemplateFileNotFoundError struct { 27 Path string 28 ChartDir string 29 } 30 31 func (err TemplateFileNotFoundError) Error() string { 32 return fmt.Sprintf("Could not resolve template file %s relative to chart path %s", err.Path, err.ChartDir) 33 } 34 35 // ChartNotFoundError is returned when a provided chart dir is not found 36 type ChartNotFoundError struct { 37 Path string 38 } 39 40 func (err ChartNotFoundError) Error() string { 41 return fmt.Sprintf("Could not chart path %s", err.Path) 42 }