Skip to content

Commit

Permalink
Fix Org/space delete job issues
Browse files Browse the repository at this point in the history
- Add a retry loop to wait for the deletion timestamp to propagate.
- Added a GetOrgForDeletion function to the org repository to avoid
  falsely returning a not found error when the role binding is deleted
  from an org during deletion.
- Consolidate CFSpaceRepository and SpaceRepository interfaces.

[#2604]
[#2605]

Co-authored-by: Dave Walter <walterda@vmware.com>
Co-authored-by: Julian Hjortshoj <hjortshojj@vmware.com>
  • Loading branch information
3 people committed Jul 5, 2023
1 parent 214e34d commit 4d12daa
Show file tree
Hide file tree
Showing 20 changed files with 360 additions and 568 deletions.
1 change: 1 addition & 0 deletions api/authorization/user_client_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
apierrors "code.cloudfoundry.org/korifi/api/errors"
"code.cloudfoundry.org/korifi/tests/helpers"
"code.cloudfoundry.org/korifi/tests/matchers"

"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
4 changes: 2 additions & 2 deletions api/handlers/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type App struct {
processRepo CFProcessRepository
routeRepo CFRouteRepository
domainRepo CFDomainRepository
spaceRepo SpaceRepository
spaceRepo CFSpaceRepository
packageRepo CFPackageRepository
requestValidator RequestValidator
}
Expand All @@ -73,7 +73,7 @@ func NewApp(
processRepo CFProcessRepository,
routeRepo CFRouteRepository,
domainRepo CFDomainRepository,
spaceRepo SpaceRepository,
spaceRepo CFSpaceRepository,
packageRepo CFPackageRepository,
requestValidator RequestValidator,
) *App {
Expand Down
4 changes: 2 additions & 2 deletions api/handlers/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var _ = Describe("App", func() {
processRepo *fake.CFProcessRepository
routeRepo *fake.CFRouteRepository
domainRepo *fake.CFDomainRepository
spaceRepo *fake.SpaceRepository
spaceRepo *fake.CFSpaceRepository
packageRepo *fake.CFPackageRepository
requestValidator *fake.RequestValidator
req *http.Request
Expand All @@ -48,7 +48,7 @@ var _ = Describe("App", func() {
processRepo = new(fake.CFProcessRepository)
routeRepo = new(fake.CFRouteRepository)
domainRepo = new(fake.CFDomainRepository)
spaceRepo = new(fake.SpaceRepository)
spaceRepo = new(fake.CFSpaceRepository)
packageRepo = new(fake.CFPackageRepository)
requestValidator = new(fake.RequestValidator)

Expand Down

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions api/handlers/fake/cfspace_repository.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d12daa

Please sign in to comment.