예제 #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)
}
예제 #2
0
func checkConfigValid(c *gc.C, config discoverspaces.Config) {
	c.Check(config.Validate(), jc.ErrorIsNil)
}