github.com/hashicorp/packer@v1.14.3/packer_test/dag_tests/mix_data_locals_test.go (about) 1 package main 2 3 import ( 4 "fmt" 5 6 "github.com/hashicorp/packer/packer_test/common/check" 7 ) 8 9 func (ts *PackerDAGTestSuite) TestWithBothDataLocalMixedOrder() { 10 pluginDir := ts.MakePluginDir() 11 defer pluginDir.Cleanup() 12 13 for _, cmd := range []string{"build", "validate"} { 14 ts.Run(fmt.Sprintf("%s: evaluating with DAG - success expected", cmd), func() { 15 ts.PackerCommand().UsePluginDir(pluginDir). 16 SetArgs(cmd, "./templates/mixed_data_local.pkr.hcl"). 17 Assert(check.MustSucceed()) 18 }) 19 20 ts.Run(fmt.Sprintf("%s: evaluating sequentially - failure expected", cmd), func() { 21 ts.PackerCommand().UsePluginDir(pluginDir). 22 SetArgs(cmd, "--use-sequential-evaluation", "./templates/mixed_data_local.pkr.hcl"). 23 Assert(check.MustFail()) 24 }) 25 } 26 }