Implement git handlers integration test

This commit is contained in:
2024-11-29 23:14:36 +01:00
parent 6aa3fd6c65
commit 1ddf93a8be
6 changed files with 352 additions and 11 deletions

View File

@@ -35,6 +35,14 @@ func NewService(rootDir string) *Service {
// NewServiceWithOptions creates a new Storage instance with the given options and the given rootDir root directory.
func NewServiceWithOptions(rootDir string, options Options) *Service {
if options.Fs == nil {
options.Fs = &osFS{}
}
if options.NewGitClient == nil {
options.NewGitClient = git.New
}
return &Service{
fs: options.Fs,
newGitClient: options.NewGitClient,