mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
test builds can be 'excepted'
This commit is contained in:
parent
c1c8b8d22a
commit
a15ad19411
2 changed files with 32 additions and 2 deletions
|
|
@ -28,6 +28,11 @@ carbonara
|
|||
tomato
|
||||
mozza
|
||||
cooking...
|
||||
`
|
||||
tiramisu = `whip_york
|
||||
mascarpone
|
||||
whipped_egg_white
|
||||
dress
|
||||
`
|
||||
)
|
||||
|
||||
|
|
@ -254,6 +259,7 @@ func TestBuild(t *testing.T) {
|
|||
expectedContent: map[string]string{
|
||||
"NULL.spaghetti_carbonara.txt": spaghettiCarbonara,
|
||||
"NULL.lasagna.txt": lasagna,
|
||||
"NULL.tiramisu.txt": tiramisu,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -267,7 +273,8 @@ func TestBuild(t *testing.T) {
|
|||
fileCheck: fileCheck{
|
||||
notExpected: []string{"NULL.spaghetti_carbonara.txt"},
|
||||
expectedContent: map[string]string{
|
||||
"NULL.lasagna.txt": lasagna,
|
||||
"NULL.lasagna.txt": lasagna,
|
||||
"NULL.tiramisu.txt": tiramisu,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -279,7 +286,10 @@ func TestBuild(t *testing.T) {
|
|||
testFixture("hcl", "recipes"),
|
||||
},
|
||||
fileCheck: fileCheck{
|
||||
notExpected: []string{"NULL.spaghetti_carbonara.txt"},
|
||||
notExpected: []string{
|
||||
"NULL.spaghetti_carbonara.txt",
|
||||
"NULL.tiramisu.txt",
|
||||
},
|
||||
expectedContent: map[string]string{
|
||||
"NULL.lasagna.txt": lasagna,
|
||||
},
|
||||
|
|
@ -293,6 +303,9 @@ func TestBuild(t *testing.T) {
|
|||
testFixture("hcl", "recipes"),
|
||||
},
|
||||
fileCheck: fileCheck{
|
||||
notExpected: []string{
|
||||
"NULL.tiramisu.txt",
|
||||
},
|
||||
expectedContent: map[string]string{
|
||||
"NULL.spaghetti_carbonara.txt": spaghettiCarbonara,
|
||||
"NULL.lasagna.txt": lasagna,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,23 @@ build {
|
|||
source "source.null.base" {
|
||||
name = "tiramisu"
|
||||
}
|
||||
|
||||
provisioner "shell-local" {
|
||||
name = "whipped_york"
|
||||
inline = [ "echo whip_york > ${upper(build.ID)}.${source.name}.txt" ]
|
||||
}
|
||||
provisioner "shell-local" {
|
||||
name = "mascarpone"
|
||||
inline = [ "echo mascarpone >> ${upper(build.ID)}.${source.name}.txt" ]
|
||||
}
|
||||
post-processor "shell-local" {
|
||||
name = "whipped_egg_white"
|
||||
inline = [ "echo whipped_egg_white >> ${upper(build.ID)}.${source.name}.txt" ]
|
||||
}
|
||||
post-processor "shell-local" {
|
||||
name = "dress_with_coffeed_boudoirs"
|
||||
inline = [ "echo dress >> ${upper(build.ID)}.${source.name}.txt" ]
|
||||
}
|
||||
}
|
||||
|
||||
build {
|
||||
|
|
|
|||
Loading…
Reference in a new issue