Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifosmin Simon committed Nov 25, 2024
1 parent 6b6b870 commit e960188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/provider/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ func (s *Service) fetchNewResources(ctx context.Context, p *domain.Provider) ([]

func (s *Service) compareResources(ctx context.Context, existingResources map[string]*domain.Resource, newResources []*domain.Resource) []*domain.Resource {
// (*existingProviderResources)[newResource.GlobalURN] = true
var res []*domain.Resource
res := []*domain.Resource{}
for _, new := range newResources {
new.Children = s.compareResources(ctx, existingResources, new.Children)

Expand Down
2 changes: 1 addition & 1 deletion core/provider/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (s *ServiceTestSuite) TestCreate() {
ProviderURN: p.URN,
}).Return([]*domain.Resource{}, nil).Once()
s.mockProvider.On("GetResources", mockCtx, p.Config).Return(expectedResources, nil).Once()
s.mockResourceService.On("BulkUpsert", mock.Anything, []*domain.Resource(nil)).Return(nil).Once()
s.mockResourceService.On("BulkUpsert", mock.Anything, expectedResources).Return(nil).Once()

actualError := s.service.Create(context.Background(), p)

Expand Down

0 comments on commit e960188

Please sign in to comment.