func (s *OriginTypeSuite) TestValidateInvalid(c *gc.C) { ot := logfwd.OriginType(999) err := ot.Validate() c.Check(err, jc.Satisfies, errors.IsNotValid) c.Check(err, gc.ErrorMatches, `unsupported origin type`) }
func (s *OriginSuite) TestValidateBadOriginType(c *gc.C) { origin := validOrigin origin.Type = logfwd.OriginType(999) err := origin.Validate() c.Check(err, jc.Satisfies, errors.IsNotValid) c.Check(err, gc.ErrorMatches, `invalid Type: unsupported origin type`) }