diff options
Diffstat (limited to 'cmd/gitaly-hooks')
-rw-r--r-- | cmd/gitaly-hooks/hooks.go | 2 | ||||
-rw-r--r-- | cmd/gitaly-hooks/hooks_test.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd/gitaly-hooks/hooks.go b/cmd/gitaly-hooks/hooks.go index 4f4814b69..822a8947b 100644 --- a/cmd/gitaly-hooks/hooks.go +++ b/cmd/gitaly-hooks/hooks.go @@ -182,7 +182,7 @@ func check(configPath string) (*gitlab.CheckInfo, error) { return nil, err } - gitlabAPI, err := gitlab.NewGitlabAPI(cfg.Gitlab, cfg.TLS) + gitlabAPI, err := gitlab.NewHTTPClient(cfg.Gitlab, cfg.TLS) if err != nil { return nil, err } diff --git a/cmd/gitaly-hooks/hooks_test.go b/cmd/gitaly-hooks/hooks_test.go index ba04d7f20..3ca038d36 100644 --- a/cmd/gitaly-hooks/hooks_test.go +++ b/cmd/gitaly-hooks/hooks_test.go @@ -172,7 +172,7 @@ func testHooksPrePostReceive(t *testing.T, cfg config.Cfg, repo *gitalypb.Reposi t.Run(fmt.Sprintf("hookName: %s", hookName), func(t *testing.T) { customHookOutputPath := gittest.WriteEnvToCustomHook(t, repoPath, hookName) - gitlabAPI, err := gitlab.NewGitlabAPI(cfg.Gitlab, cfg.TLS) + gitlabAPI, err := gitlab.NewHTTPClient(cfg.Gitlab, cfg.TLS) require.NoError(t, err) stop := runHookServiceServerWithAPI(t, cfg, gitlabAPI) @@ -351,7 +351,7 @@ func TestHooksPostReceiveFailed(t *testing.T) { cfg.Gitlab.URL = serverURL cfg.Gitlab.SecretFile = testhelper.WriteShellSecretFile(t, cfg.GitlabShell.Dir, secretToken) - gitlabAPI, err := gitlab.NewGitlabAPI(cfg.Gitlab, cfg.TLS) + gitlabAPI, err := gitlab.NewHTTPClient(cfg.Gitlab, cfg.TLS) require.NoError(t, err) customHookOutputPath := gittest.WriteEnvToCustomHook(t, repoPath, "post-receive") @@ -465,7 +465,7 @@ func TestHooksNotAllowed(t *testing.T) { customHookOutputPath := gittest.WriteEnvToCustomHook(t, repoPath, "post-receive") - gitlabAPI, err := gitlab.NewGitlabAPI(cfg.Gitlab, cfg.TLS) + gitlabAPI, err := gitlab.NewHTTPClient(cfg.Gitlab, cfg.TLS) require.NoError(t, err) stop := runHookServiceServerWithAPI(t, cfg, gitlabAPI) |