helper/config: tests
This commit is contained in:
parent
fd2d44c212
commit
ac444accb1
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue