Skip to content

Commit

Permalink
fix: use internal errors package
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRichardson committed Nov 8, 2024
1 parent 6a67cfe commit dc34beb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apiserver/facades/client/application/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (s *applicationSuite) makeAPI(c *gc.C) {
Type: model.IAAS,
}
registry := provider.NewStorageProviderRegistry(env)
domainServicesGetter := s.DomainServicesGetter(c, s.NoopObjectStore(c))
domainServicesGetter := s.DomainServicesGetter(c, s.NoopObjectStore(c), s.NoopLeaseManager(c))
storageService := domainServicesGetter.ServicesForModel(model.UUID(st.ModelUUID())).Storage()
applicationService := domainServices.Application()

Expand Down
5 changes: 3 additions & 2 deletions internal/worker/domainservices/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/juju/juju/core/providertracker"
"github.com/juju/juju/core/storage"
domainservices "github.com/juju/juju/domain/services"
internalerrors "github.com/juju/juju/internal/errors"
"github.com/juju/juju/internal/services"
internalstorage "github.com/juju/juju/internal/storage"
)
Expand Down Expand Up @@ -254,12 +255,12 @@ func (s modelApplicationLeaseManager) GetLeaseManager() (lease.LeaseCheckerWaite
// be happy with a sync.Pool at minimum though.
claimer, err := s.manager.Claimer(lease.ApplicationLeadershipNamespace, s.modelUUID.String())
if err != nil {
return nil, errors.Errorf("getting claim lease manager: %w", err)
return nil, internalerrors.Errorf("getting claim lease manager: %w", err)
}

checker, err := s.manager.Checker(lease.ApplicationLeadershipNamespace, s.modelUUID.String())
if err != nil {
return nil, errors.Errorf("getting checker lease manager: %w", err)
return nil, internalerrors.Errorf("getting checker lease manager: %w", err)
}

return &leaseManager{
Expand Down

0 comments on commit dc34beb

Please sign in to comment.