packer: Test to make sure DispatchHook implements Hook
This commit is contained in:
parent
f74341a7b9
commit
7fdb53f5d1
|
@ -19,6 +19,15 @@ func (t *TestHook) Run(name string, data interface{}, ui 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) {
|
||||
// Just make sure nothing blows up
|
||||
dh := &DispatchHook{make(map[string][]Hook)}
|
||||
|
|
Loading…
Reference in New Issue