Tests: Should not error when `vagrantfile_template` exists

This commit is contained in:
DanHam 2019-08-05 18:26:59 +01:00
parent 0eebebaedb
commit 4b042ac402
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 6 additions and 1 deletions

View File

@ -137,11 +137,16 @@ func TestPostProcessorPrepare_vagrantfileTemplateExists(t *testing.T) {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)
} }
var p PostProcessor
if err := p.Configure(c); err != nil {
t.Fatal("no error expected as vagrantfile_template exists")
}
if err := os.Remove(name); err != nil { if err := os.Remove(name); err != nil {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)
} }
var p PostProcessor
if err := p.Configure(c); err == nil { if err := p.Configure(c); err == nil {
t.Fatal("expected an error since vagrantfile_template does not exist") t.Fatal("expected an error since vagrantfile_template does not exist")
} }