Merge pull request #9197 from hashicorp/fix_9186

fix iso config prepare
This commit is contained in:
Megan Marsh 2020-05-08 15:55:46 -07:00 committed by GitHub
commit 0f3e749f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -63,11 +63,9 @@ func (c *Config) Prepare(raws ...interface{}) ([]string, error) {
warnings := make([]string, 0) warnings := make([]string, 0)
errs := new(packer.MultiError) errs := new(packer.MultiError)
if c.ISOUrls != nil {
isoWarnings, isoErrs := c.ISOConfig.Prepare(&c.ctx) isoWarnings, isoErrs := c.ISOConfig.Prepare(&c.ctx)
warnings = append(warnings, isoWarnings...) warnings = append(warnings, isoWarnings...)
errs = packer.MultiErrorAppend(errs, isoErrs...) errs = packer.MultiErrorAppend(errs, isoErrs...)
}
errs = packer.MultiErrorAppend(errs, c.ConnectConfig.Prepare()...) errs = packer.MultiErrorAppend(errs, c.ConnectConfig.Prepare()...)
errs = packer.MultiErrorAppend(errs, c.CreateConfig.Prepare()...) errs = packer.MultiErrorAppend(errs, c.CreateConfig.Prepare()...)

View File

@ -47,6 +47,7 @@ func TestFixerDockerTags_Fix(t *testing.T) {
output, err := f.Fix(input) output, err := f.Fix(input)
assert.NoError(t, err) assert.NoError(t, err)
for k, v := range expected {
assert.Equalf(t, expected, output, "should have removed tag from template") assert.EqualValues(t, v, output[k])
}
} }