2014-04-06 19:21:22 +02:00
|
|
|
package pvm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
2016-12-11 21:13:37 +02:00
|
|
|
"testing"
|
|
|
|
|
2017-04-04 13:39:01 -07:00
|
|
|
parallelscommon "github.com/hashicorp/packer/builder/parallels/common"
|
2020-11-17 16:31:03 -08:00
|
|
|
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
2020-11-20 10:21:29 -08:00
|
|
|
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
2014-04-06 19:21:22 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func testState(t *testing.T) multistep.StateBag {
|
|
|
|
state := new(multistep.BasicStateBag)
|
|
|
|
state.Put("driver", new(parallelscommon.DriverMock))
|
2020-11-20 10:21:29 -08:00
|
|
|
state.Put("ui", &packersdk.BasicUi{
|
2014-04-06 19:21:22 +02:00
|
|
|
Reader: new(bytes.Buffer),
|
|
|
|
Writer: new(bytes.Buffer),
|
|
|
|
})
|
|
|
|
return state
|
|
|
|
}
|