mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:11:49 +00:00
Remove repos.Source traces from fakeChangesetSource (#45153)
This is not required for batch changes anymore since we switched to our own Source type, so removing it to keep it lean 🧹
This commit is contained in:
parent
07a0a59b6a
commit
3240589065
@ -8,7 +8,6 @@ import (
|
||||
btypes "github.com/sourcegraph/sourcegraph/enterprise/internal/batches/types"
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver/protocol"
|
||||
"github.com/sourcegraph/sourcegraph/internal/repos"
|
||||
"github.com/sourcegraph/sourcegraph/internal/types"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
@ -110,7 +109,6 @@ var (
|
||||
_ sources.ChangesetSource = &FakeChangesetSource{}
|
||||
_ sources.ArchivableChangesetSource = &FakeChangesetSource{}
|
||||
_ sources.DraftChangesetSource = &FakeChangesetSource{}
|
||||
_ repos.Source = &FakeChangesetSource{}
|
||||
)
|
||||
|
||||
func (s *FakeChangesetSource) CreateDraftChangeset(ctx context.Context, c *sources.Changeset) (bool, error) {
|
||||
@ -215,17 +213,6 @@ func (s *FakeChangesetSource) UpdateChangeset(ctx context.Context, c *sources.Ch
|
||||
|
||||
var fakeNotImplemented = errors.New("not implemented in FakeChangesetSource")
|
||||
|
||||
func (s *FakeChangesetSource) ListRepos(ctx context.Context, results chan repos.SourceResult) {
|
||||
s.ListReposCalled = true
|
||||
|
||||
results <- repos.SourceResult{Source: s, Err: fakeNotImplemented}
|
||||
}
|
||||
|
||||
// CheckConnection fake impmentation is always available.
|
||||
func (s *FakeChangesetSource) CheckConnection(context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *FakeChangesetSource) ExternalServices() types.ExternalServices {
|
||||
s.ExternalServicesCalled = true
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user