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

dependencies: Add service-level test #33744

Merged
merged 4 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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