func (context *statusContext) processService(service *state.Service) (status serviceStatus) { url, _ := service.CharmURL() status.Charm = url.String() status.Exposed = service.IsExposed() status.Life = processLife(service) var err error status.Relations, status.SubordinateTo, err = context.processRelations(service) if err != nil { status.Err = err return } if service.IsPrincipal() { status.Units = context.processUnits(context.units[service.Name()]) } return status }
func (s *DeployLocalSuite) assertCharm(c *C, service *state.Service, expect *charm.URL) { curl, force := service.CharmURL() c.Assert(curl, DeepEquals, expect) c.Assert(force, Equals, false) }