Beispiel #1
0
func (s *HookContextSuite) AssertActionContext(c *gc.C, ctx *context.HookContext) {
	actionData, err := ctx.ActionData()
	c.Assert(actionData, gc.NotNil)
	c.Assert(err, jc.ErrorIsNil)
}
Beispiel #2
0
func (s *HookContextSuite) AssertNotActionContext(c *gc.C, ctx *context.HookContext) {
	actionData, err := ctx.ActionData()
	c.Assert(actionData, gc.IsNil)
	c.Assert(err, gc.ErrorMatches, "not running an action")
}