func (*serviceSuite) TestValidateMissingExecStart(c *gc.C) { service := common.Service{ Name: "a-application", Conf: common.Conf{ Desc: "some service", }, } err := service.Validate(renderer) c.Check(err, gc.ErrorMatches, ".*missing ExecStart.*") }
func (*serviceSuite) TestValidateMissingName(c *gc.C) { service := common.Service{ Conf: common.Conf{ Desc: "some service", ExecStart: "/path/to/some-command x y z", }, } err := service.Validate(renderer) c.Check(err, gc.ErrorMatches, ".*missing Name.*") }
func (*serviceSuite) TestValidateMissingDesc(c *gc.C) { service := common.Service{ Name: "a-application", Conf: common.Conf{ ExecStart: "/path/to/some-command x y z", }, } err := service.Validate(renderer) c.Check(err, gc.ErrorMatches, ".*missing Desc.*") }
func (*serviceSuite) TestValidateOkay(c *gc.C) { service := common.Service{ Name: "a-application", Conf: common.Conf{ Desc: "some service", ExecStart: "/path/to/some-command x y z", }, } err := service.Validate(renderer) c.Check(err, jc.ErrorIsNil) }