blob: b181937407aaacf919ef57dac370c912e2ba9119 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package gittest
import (
"testing"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v15/internal/git"
"gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/config"
)
// NewCommandFactory creates a new Git command factory.
func NewCommandFactory(tb testing.TB, cfg config.Cfg, opts ...git.ExecCommandFactoryOption) *git.ExecCommandFactory {
tb.Helper()
factory, cleanup, err := git.NewExecCommandFactory(cfg, opts...)
require.NoError(tb, err)
tb.Cleanup(cleanup)
return factory
}
|