github.com/rothwerx/packer@v0.9.0/builder/docker/step_test.go (about)

     1  package docker
     2  
     3  import (
     4  	"bytes"
     5  	"github.com/mitchellh/multistep"
     6  	"github.com/mitchellh/packer/packer"
     7  	"testing"
     8  )
     9  
    10  func testState(t *testing.T) multistep.StateBag {
    11  	state := new(multistep.BasicStateBag)
    12  	state.Put("config", testConfigStruct(t))
    13  	state.Put("driver", &MockDriver{})
    14  	state.Put("hook", &packer.MockHook{})
    15  	state.Put("ui", &packer.BasicUi{
    16  		Reader: new(bytes.Buffer),
    17  		Writer: new(bytes.Buffer),
    18  	})
    19  	return state
    20  }