packer-cn/packer/post_processor_test.go

21 lines
388 B
Go
Raw Normal View History

package packer
2013-06-18 13:31:52 -04:00
type TestPostProcessor struct {
configCalled bool
configVal interface{}
ppCalled bool
ppArtifact Artifact
}
2013-06-18 13:31:52 -04:00
func (pp *TestPostProcessor) Configure(v interface{}) error {
pp.configCalled = true
pp.configVal = v
return nil
}
2013-06-18 13:31:52 -04:00
func (pp *TestPostProcessor) PostProcess(a Artifact) (Artifact, error) {
pp.ppCalled = true
pp.ppArtifact = a
return nil, nil
}