Commit ac444acc authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

helper/config: tests

parent fd2d44c2
......@@ -74,6 +74,36 @@ func TestDecode(t *testing.T) {
},
},
},
"build name": {
[]interface{}{
map[string]interface{}{
"name": "{{build_name}}",
},
map[string]interface{}{
"packer_build_name": "foo",
},
},
&Target{
Name: "foo",
},
nil,
},
"build type": {
[]interface{}{
map[string]interface{}{
"name": "{{build_type}}",
},
map[string]interface{}{
"packer_builder_type": "foo",
},
},
&Target{
Name: "foo",
},
nil,
},
}
for k, tc := range cases {
......
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