Commit b5f1fd14 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: delete pause_before to avoid template invalids [GH-759]

parent 02bb5b0a
......@@ -317,6 +317,10 @@ func ParseTemplate(data []byte, vars map[string]string) (t *Template, err error)
raw.pauseBefore = duration
}
// Remove the pause_before setting if it is there so that we don't
// get template validation errors later.
delete(v, "pause_before")
raw.RawConfig = v
}
......
......@@ -1479,6 +1479,11 @@ func TestTemplateBuild_ProvisionerPauseBefore(t *testing.T) {
t.Fatalf("bad: %#v", pp.PauseBefore)
}
}
config := coreBuild.provisioners[0].config[0].(map[string]interface{})
if _, ok := config["pause_before"]; ok {
t.Fatal("pause_before should be removed")
}
}
func TestTemplateBuild_variables(t *testing.T) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment