Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
dependencies: Add service-level test (#33744)
Browse files Browse the repository at this point in the history
  • Loading branch information
efritz authored and thiswayman committed Apr 22, 2022
1 parent 370c134 commit 0b77d1d
Show file tree
Hide file tree
Showing 5 changed files with 737 additions and 3 deletions.
3 changes: 3 additions & 0 deletions internal/codeintel/dependencies/gen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package dependencies

//go:generate ../../../dev/mockgen.sh github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies -i Store -i LockfilesService -i Syncer -o mock_iface_test.go
6 changes: 4 additions & 2 deletions internal/codeintel/dependencies/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ func GetService(db database.DB, syncer Syncer) *Service {

gitService := lockfiles.NewDefaultGitService(nil, db)
lockfilesService := lockfiles.GetService(gitService)
lockfilesSemaphore := semaphore.NewWeighted(int64(lockfilesSemaphoreWeight))
syncerSemaphore := semaphore.NewWeighted(int64(syncerSemaphoreWeight))

svc = newService(
store.GetStore(db),
lockfilesService,
semaphore.NewWeighted(int64(lockfilesSemaphoreWeight)),
lockfilesSemaphore,
syncer,
semaphore.NewWeighted(int64(syncerSemaphoreWeight)),
syncerSemaphore,
observationContext,
)
})
Expand Down
Loading

0 comments on commit 0b77d1d

Please sign in to comment.