2013-06-18 13:54:22 -04:00
|
|
|
package packer
|
|
|
|
|
2013-06-19 01:45:53 -04:00
|
|
|
type TestArtifact struct {
|
|
|
|
id string
|
|
|
|
destroyCalled bool
|
|
|
|
}
|
2013-06-18 13:54:22 -04:00
|
|
|
|
|
|
|
func (*TestArtifact) BuilderId() string {
|
|
|
|
return "bid"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*TestArtifact) Files() []string {
|
|
|
|
return []string{"a", "b"}
|
|
|
|
}
|
|
|
|
|
2013-06-19 01:45:53 -04:00
|
|
|
func (a *TestArtifact) Id() string {
|
|
|
|
id := a.id
|
|
|
|
if id == "" {
|
|
|
|
id = "id"
|
|
|
|
}
|
|
|
|
|
|
|
|
return id
|
2013-06-18 13:54:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (*TestArtifact) String() string {
|
|
|
|
return "string"
|
|
|
|
}
|
2013-06-18 19:01:14 -04:00
|
|
|
|
2013-06-19 01:45:53 -04:00
|
|
|
func (a *TestArtifact) Destroy() error {
|
|
|
|
a.destroyCalled = true
|
2013-06-18 19:01:14 -04:00
|
|
|
return nil
|
|
|
|
}
|