Commit e9f7a141 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/rpc: use packer.MockArtifact

parent 105e5f6a
......@@ -6,28 +6,6 @@ import (
"testing"
)
type testArtifact struct{}
func (testArtifact) BuilderId() string {
return "bid"
}
func (testArtifact) Files() []string {
return []string{"a", "b"}
}
func (testArtifact) Id() string {
return "id"
}
func (testArtifact) String() string {
return "string"
}
func (testArtifact) Destroy() error {
return nil
}
func TestArtifactRPC(t *testing.T) {
// Create the interface to test
a := new(packer.MockArtifact)
......
......@@ -8,7 +8,7 @@ import (
"testing"
)
var testBuildArtifact = &testArtifact{}
var testBuildArtifact = &packer.MockArtifact{}
type testBuild struct {
nameCalled bool
......
......@@ -7,7 +7,7 @@ import (
"testing"
)
var testBuilderArtifact = &testArtifact{}
var testBuilderArtifact = &packer.MockArtifact{}
func builderRPCClient(t *testing.T) (*packer.MockBuilder, packer.Builder) {
b := new(packer.MockBuilder)
......
......@@ -7,7 +7,7 @@ import (
"testing"
)
var testPostProcessorArtifact = new(testArtifact)
var testPostProcessorArtifact = new(packer.MockArtifact)
type TestPostProcessor struct {
configCalled bool
......@@ -62,7 +62,7 @@ func TestPostProcessorRPC(t *testing.T) {
}
// Test PostProcess
a := new(testArtifact)
a := new(packer.MockArtifact)
ui := new(testUi)
artifact, _, err := pClient.PostProcess(ui, a)
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment