Esempio n. 1
0
func (s *BootstrapConfigFileSuite) TestReadEmptyFile(c *gc.C) {
	path := osenv.JujuXDGDataHomePath("bootstrap-config.yaml")
	err := ioutil.WriteFile(path, []byte(""), 0600)
	c.Assert(err, jc.ErrorIsNil)

	configs, err := jujuclient.ReadBootstrapConfigFile(path)
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(configs, gc.HasLen, 0)
}
Esempio n. 2
0
func (s *BootstrapConfigFileSuite) TestReadNoFile(c *gc.C) {
	controllers, err := jujuclient.ReadBootstrapConfigFile("nohere.yaml")
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(controllers, gc.IsNil)
}