func (s *configSuite) TestValidateMissingRemote(c *gc.C) { cfg := lxdclient.Config{ Namespace: "my-ns", Dirname: "some-dir", } err := cfg.Validate() c.Check(err, jc.Satisfies, errors.IsNotValid) }
func (s *configSuite) TestValidateOkay(c *gc.C) { cfg := lxdclient.Config{ Namespace: "my-ns", Dirname: "some-dir", Remote: s.remote, } err := cfg.Validate() c.Check(err, jc.ErrorIsNil) }
func (s *configSuite) TestValidateZeroValue(c *gc.C) { var cfg lxdclient.Config err := cfg.Validate() c.Check(err, jc.Satisfies, errors.IsNotValid) }