docker-import + docker-push: Add some beginning tests. #774

This commit is contained in:
Matthew McKeen
2014-01-13 13:21:34 -08:00
parent 637fa38286
commit 358b0078c9
3 changed files with 62 additions and 2 deletions
@@ -0,0 +1,31 @@
package dockerpush
import (
"bytes"
"github.com/mitchellh/packer/packer"
"testing"
)
func testConfig() map[string]interface{} {
return map[string]interface{}{}
}
func testPP(t *testing.T) *PostProcessor {
var p PostProcessor
if err := p.Configure(testConfig()); err != nil {
t.Fatalf("err: %s", err)
}
return &p
}
func testUi() *packer.BasicUi {
return &packer.BasicUi{
Reader: new(bytes.Buffer),
Writer: new(bytes.Buffer),
}
}
func TestPostProcessor_ImplementsPostProcessor(t *testing.T) {
var _ packer.PostProcessor = new(PostProcessor)
}