diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-04-27 11:56:51 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-04-27 12:13:12 +0300 |
commit | fe6b500dd60fc6efdca1397bc9abe487a4723650 (patch) | |
tree | eab311fdcf3aaf0b478fa6bbbded79cc867bf68d /internal/gitaly/hook/prereceive_test.go | |
parent | bda41425ea8f7721e37f1f47e5c0b9c52d6a9143 (diff) |
gitlab: Split out and rename mock client
Mock client and the interface it is mocking are currently living in the
same file. This makes it hard to see what's what. Improve this by
splitting out the mock client into its own file. While we're at it, this
also renames the `mockAPI` into `MockClient`, which is more in line with
the `HTTPClient` implementation.
Diffstat (limited to 'internal/gitaly/hook/prereceive_test.go')
-rw-r--r-- | internal/gitaly/hook/prereceive_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/gitaly/hook/prereceive_test.go b/internal/gitaly/hook/prereceive_test.go index 2fe6a67f0..ce08ec720 100644 --- a/internal/gitaly/hook/prereceive_test.go +++ b/internal/gitaly/hook/prereceive_test.go @@ -25,7 +25,7 @@ import ( func TestPrereceive_customHooks(t *testing.T) { cfg, repo, repoPath := testcfg.BuildWithRepo(t) - hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg, backchannel.NewRegistry()), gitlab.GitlabAPIStub, cfg) + hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg, backchannel.NewRegistry()), gitlab.NewMockClient(), cfg) receiveHooksPayload := &git.ReceiveHooksPayload{ UserID: "1234", |