github.com/homburg/packer@v0.6.1-0.20140528012651-1dcaf1716848/packer/artifact_test.go (about) 1 package packer 2 3 type TestArtifact struct { 4 id string 5 destroyCalled bool 6 } 7 8 func (*TestArtifact) BuilderId() string { 9 return "bid" 10 } 11 12 func (*TestArtifact) Files() []string { 13 return []string{"a", "b"} 14 } 15 16 func (a *TestArtifact) Id() string { 17 id := a.id 18 if id == "" { 19 id = "id" 20 } 21 22 return id 23 } 24 25 func (*TestArtifact) String() string { 26 return "string" 27 } 28 29 func (a *TestArtifact) Destroy() error { 30 a.destroyCalled = true 31 return nil 32 }