diff --git a/post-processor/vagrant/post-processor_test.go b/post-processor/vagrant/post-processor_test.go index 372e1da68..fccf4cf24 100644 --- a/post-processor/vagrant/post-processor_test.go +++ b/post-processor/vagrant/post-processor_test.go @@ -148,7 +148,14 @@ func TestPostProcessorPrepare_vagrantfileTemplateExists(t *testing.T) { } if err := p.Configure(c); err == nil { - t.Fatal("expected an error since vagrantfile_template does not exist") + t.Fatal("expected error since vagrantfile_template does not exist and vagrantfile_template_generated is unset") + } + + // The vagrantfile_template will be generated during the build process + c["vagrantfile_template_generated"] = true + + if err := p.Configure(c); err != nil { + t.Fatal("no error expected due to missing vagrantfile_template as vagrantfile_template_generated is set") } }