示例#1
0
文件: utils_test.go 项目: bac/juju
func (s *utilsSuite) TestEnableHTTPSListenerError(c *gc.C) {
	var client mockConfigSetter
	client.SetErrors(errors.New("uh oh"))
	err := lxdclient.EnableHTTPSListener(&client)
	c.Assert(err, gc.ErrorMatches, "uh oh")
}
示例#2
0
文件: environ.go 项目: kat-co/juju
// PrepareForBootstrap implements environs.Environ.
func (env *environ) PrepareForBootstrap(ctx environs.BootstrapContext) error {
	if err := lxdclient.EnableHTTPSListener(env.raw); err != nil {
		return errors.Annotate(err, "enabling HTTPS listener")
	}
	return nil
}
示例#3
0
文件: utils_test.go 项目: bac/juju
func (s *utilsSuite) TestEnableHTTPSListener(c *gc.C) {
	var client mockConfigSetter
	err := lxdclient.EnableHTTPSListener(&client)
	c.Assert(err, jc.ErrorIsNil)
	client.CheckCall(c, 0, "SetConfig", "core.https_address", "[::]")
}