github.phpd.cn/hashicorp/packer@v1.3.2/builder/triton/step_test.go (about) 1 package triton 2 3 import ( 4 "bytes" 5 "testing" 6 7 "github.com/hashicorp/packer/helper/multistep" 8 "github.com/hashicorp/packer/packer" 9 ) 10 11 func testState(t *testing.T) multistep.StateBag { 12 state := new(multistep.BasicStateBag) 13 state.Put("config", testConfig(t)) 14 state.Put("driver", &DriverMock{}) 15 state.Put("hook", &packer.MockHook{}) 16 state.Put("ui", &packer.BasicUi{ 17 Reader: new(bytes.Buffer), 18 Writer: new(bytes.Buffer), 19 }) 20 return state 21 }