diff --git a/acctest/testing.go b/acctest/testing.go index dd18be1a365..f88d2dde3e9 100644 --- a/acctest/testing.go +++ b/acctest/testing.go @@ -136,6 +136,9 @@ func Test(t TestT, c TestCase) { Components: packer.ComponentFinder{ PluginConfig: &packer.PluginConfig{ Builders: TestBuilderSet{ + BuilderSet: packersdk.MapOfBuilder{ + "test": func() (packersdk.Builder, error) { return c.Builder, nil }, + }, StartFn: func(n string) (packersdk.Builder, error) { if n == "test" { return c.Builder, nil diff --git a/packer/core.go b/packer/core.go index 4803f1de474..7a56dc06cc5 100644 --- a/packer/core.go +++ b/packer/core.go @@ -229,7 +229,7 @@ func (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName strings.Split(rawP.Type, "-")[0], ) - if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Builders.List()); sugg != "" { + if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Provisioners.List()); sugg != "" { err = fmt.Errorf("Did you mean to use %q?", sugg) }