Tests: Should not error when template is to be created during build

This commit is contained in:
DanHam 2019-08-05 18:30:39 +01:00
parent 4b042ac402
commit 19f3a63ee1
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 8 additions and 1 deletions

View File

@ -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")
}
}