Commit 7fdb53f5 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: Test to make sure DispatchHook implements Hook

parent f74341a7
...@@ -19,6 +19,15 @@ func (t *TestHook) Run(name string, data interface{}, ui Ui) { ...@@ -19,6 +19,15 @@ func (t *TestHook) Run(name string, data interface{}, ui Ui) {
t.runUi = ui t.runUi = ui
} }
func TestDispatchHook_Implements(t *testing.T) {
assert := asserts.NewTestingAsserts(t, true)
var r Hook
c := &DispatchHook{nil}
assert.Implementor(c, &r, "should be a Hook")
}
func TestDispatchHook_Run_NoHooks(t *testing.T) { func TestDispatchHook_Run_NoHooks(t *testing.T) {
// Just make sure nothing blows up // Just make sure nothing blows up
dh := &DispatchHook{make(map[string][]Hook)} dh := &DispatchHook{make(map[string][]Hook)}
......
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