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") }
// 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 }
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", "[::]") }