You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/packer_test/dag_tests/mix_data_locals_test.go

27 lines
756 B

package main
import (
"fmt"
"github.com/hashicorp/packer/packer_test/common/check"
)
func (ts *PackerDAGTestSuite) TestWithBothDataLocalMixedOrder() {
pluginDir := ts.MakePluginDir()
defer pluginDir.Cleanup()
for _, cmd := range []string{"build", "validate"} {
ts.Run(fmt.Sprintf("%s: evaluating with DAG - success expected", cmd), func() {
ts.PackerCommand().UsePluginDir(pluginDir).
SetArgs(cmd, "./templates/mixed_data_local.pkr.hcl").
Assert(check.MustSucceed())
})
ts.Run(fmt.Sprintf("%s: evaluating sequentially - failure expected", cmd), func() {
ts.PackerCommand().UsePluginDir(pluginDir).
SetArgs(cmd, "--use-sequential-evaluation", "./templates/mixed_data_local.pkr.hcl").
Assert(check.MustFail())
})
}
}