diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-12-02 16:49:45 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-12-03 16:28:43 +0300 |
commit | bec4c7dfd161d2a985baebef976d9623497b3108 (patch) | |
tree | 468f1fe6db8b0041f93c85dd7a4829b6539b58da | |
parent | 8d8101daa724319ba8fd9597fe5c5edddbf05ae6 (diff) |
git: Remove split package for hooks tests
The hooks test is currently in a different package than the actual code
in `internal/git`. There doesn't seem to be any valid reason to do so
anymore, so let's move it into the main package.
-rw-r--r-- | internal/git/hooks_test.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/git/hooks_test.go b/internal/git/hooks_test.go index 3b2dce3b4..126d098f9 100644 --- a/internal/git/hooks_test.go +++ b/internal/git/hooks_test.go @@ -1,4 +1,4 @@ -package git_test +package git import ( "strings" @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/internal/command" - "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) @@ -23,8 +22,8 @@ func TestWithRefHook(t *testing.T) { defer func(oldToken string) { config.Config.Auth.Token = oldToken }(config.Config.Auth.Token) config.Config.Auth.Token = token - opt := git.WithRefTxHook(ctx, testRepo, config.Config) - subCmd := git.SubCmd{Name: "update-ref", Args: []string{"refs/heads/master", git.NullSHA}} + opt := WithRefTxHook(ctx, testRepo, config.Config) + subCmd := SubCmd{Name: "update-ref", Args: []string{"refs/heads/master", NullSHA}} for _, tt := range []struct { name string @@ -33,19 +32,19 @@ func TestWithRefHook(t *testing.T) { { name: "SafeCmd", fn: func() (*command.Command, error) { - return git.SafeCmd(ctx, testRepo, nil, subCmd, opt) + return SafeCmd(ctx, testRepo, nil, subCmd, opt) }, }, { name: "SafeCmdWithEnv", fn: func() (*command.Command, error) { - return git.SafeCmdWithEnv(ctx, nil, testRepo, nil, subCmd, opt) + return SafeCmdWithEnv(ctx, nil, testRepo, nil, subCmd, opt) }, }, { name: "SafeStdinCmd", fn: func() (*command.Command, error) { - return git.SafeStdinCmd(ctx, testRepo, nil, subCmd, opt) + return SafeStdinCmd(ctx, testRepo, nil, subCmd, opt) }, }, } { |