From da85c8a83213988f78f81279c577f9c585ec7729 Mon Sep 17 00:00:00 2001 From: Erik Seliger Date: Thu, 15 Feb 2024 20:39:56 +0100 Subject: [PATCH] gitserver: Small mocks cleanup (#60497) Test plan: Just removed some mock code, CI should find any issues. --- cmd/frontend/internal/app/ui/raw_test.go | 1 - internal/gitserver/client.go | 5 ----- 2 files changed, 6 deletions(-) diff --git a/cmd/frontend/internal/app/ui/raw_test.go b/cmd/frontend/internal/app/ui/raw_test.go index 597a429e95c..8217435cd52 100644 --- a/cmd/frontend/internal/app/ui/raw_test.go +++ b/cmd/frontend/internal/app/ui/raw_test.go @@ -49,7 +49,6 @@ func initHTTPTestGitServer(t *testing.T, httpStatusCode int, resp string) { t.Cleanup(func() { s.Close() - gitserver.ResetClientMocks() }) } diff --git a/internal/gitserver/client.go b/internal/gitserver/client.go index c2f31226c3e..f109b9d6278 100644 --- a/internal/gitserver/client.go +++ b/internal/gitserver/client.go @@ -35,7 +35,6 @@ import ( const git = "git" var ClientMocks, emptyClientMocks struct { - GetObject func(repo api.RepoName, objectName string) (*gitdomain.GitObject, error) LocalGitserver bool LocalGitCommandReposDir string } @@ -1195,10 +1194,6 @@ func (c *clientImplementor) GetObject(ctx context.Context, repo api.RepoName, ob }) defer endObservation(1, observation.Args{}) - if ClientMocks.GetObject != nil { - return ClientMocks.GetObject(repo, objectName) - } - req := protocol.GetObjectRequest{ Repo: repo, ObjectName: objectName,