2014-04-06 13:21:22 -04:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
2016-12-11 14:13:37 -05:00
|
|
|
"testing"
|
|
|
|
|
2017-04-04 16:39:01 -04:00
|
|
|
"github.com/hashicorp/packer/packer"
|
2014-04-06 13:21:22 -04:00
|
|
|
"github.com/mitchellh/multistep"
|
|
|
|
)
|
|
|
|
|
|
|
|
func testState(t *testing.T) multistep.StateBag {
|
|
|
|
state := new(multistep.BasicStateBag)
|
2016-05-17 18:42:15 -04:00
|
|
|
state.Put("debug", false)
|
2014-04-06 13:21:22 -04:00
|
|
|
state.Put("driver", new(DriverMock))
|
|
|
|
state.Put("ui", &packer.BasicUi{
|
|
|
|
Reader: new(bytes.Buffer),
|
|
|
|
Writer: new(bytes.Buffer),
|
|
|
|
})
|
|
|
|
return state
|
|
|
|
}
|