2013-12-24 01:07:43 -05:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
2018-01-22 18:32:33 -05:00
|
|
|
"testing"
|
|
|
|
|
2020-12-17 16:29:25 -05:00
|
|
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
|
|
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
2013-12-24 01:07:43 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
func testState(t *testing.T) multistep.StateBag {
|
|
|
|
state := new(multistep.BasicStateBag)
|
2013-12-24 16:26:44 -05:00
|
|
|
state.Put("driver", new(DriverMock))
|
2020-11-20 13:21:29 -05:00
|
|
|
state.Put("ui", &packersdk.BasicUi{
|
2013-12-24 01:07:43 -05:00
|
|
|
Reader: new(bytes.Buffer),
|
|
|
|
Writer: new(bytes.Buffer),
|
|
|
|
})
|
2018-12-03 19:03:02 -05:00
|
|
|
state.Put("temporaryDevices", []string{})
|
2013-12-24 01:07:43 -05:00
|
|
|
return state
|
|
|
|
}
|