func (s *HookContextSuite) AssertActionContext(c *gc.C, ctx *context.HookContext) { actionData, err := ctx.ActionData() c.Assert(actionData, gc.NotNil) c.Assert(err, jc.ErrorIsNil) }
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") }