Exemple #1
0
func checkAlwaysInvalid(c *gc.C, config discoverspaces.Config, message string) {
	check := func(err error) {
		c.Check(err.Error(), gc.Equals, message)
		c.Check(err, jc.Satisfies, errors.IsNotValid)
	}

	err := config.Validate()
	check(err)

	worker, err := discoverspaces.NewWorker(config)
	c.Check(worker, gc.IsNil)
	check(err)
}
Exemple #2
0
func checkConfigValid(c *gc.C, config discoverspaces.Config) {
	c.Check(config.Validate(), jc.ErrorIsNil)
}