Updated test logic and Error->Errof for formatted output.
This commit is contained in:
parent
6dc71590eb
commit
3a6ab0fc0e
|
@ -133,6 +133,6 @@ func TestImageFilterOptionsDecode(t *testing.T) {
|
|||
}
|
||||
err := mapstructure.Decode(input, &opts)
|
||||
if err != nil {
|
||||
t.Error("Did not successfully generate ImageFilterOptions from %v. Contains %v", input, opts)
|
||||
t.Errorf("Did not successfully generate ImageFilterOptions from %v. Contains %v", input, opts)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|||
}
|
||||
}
|
||||
|
||||
if c.SourceImage == "" && c.SourceImageName == "" && c.SourceImageFilters.Filters != nil {
|
||||
if c.SourceImage == "" && c.SourceImageName == "" && c.SourceImageFilters.Filters == nil {
|
||||
errs = append(errs, errors.New("Either a source_image, a source_image_name, or must be specified"))
|
||||
} else if len(c.SourceImage) > 0 && len(c.SourceImageName) > 0 {
|
||||
errs = append(errs, errors.New("Only a source_image or a source_image_name can be specified, not both."))
|
||||
|
|
Loading…
Reference in New Issue