Skip to content

Commit

Permalink
Merge pull request #408 from fluxcd/fix-e2e
Browse files Browse the repository at this point in the history
build: Fix e2e tests broken after #402
  • Loading branch information
Paulo Gomes committed Nov 15, 2022
2 parents 286ec55 + 5723219 commit f70757d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions git/internal/e2e/git_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ import (
"github.com/fluxcd/pkg/git"
"github.com/fluxcd/pkg/git/gogit"
"github.com/fluxcd/pkg/git/libgit2"
"github.com/fluxcd/pkg/git/repository"
)

func newClient(gitClient, tmp string, authOptions *git.AuthOptions, insecure bool) (git.RepositoryClient, error) {
func newClient(gitClient, tmp string, authOptions *git.AuthOptions, insecure bool) (repository.Client, error) {
switch gitClient {
case gogit.ClientName:
if insecure {
return gogit.NewClient(tmp, authOptions, gogit.WithInsecureCredentialsOverHTTP, gogit.WithDiskStorage)
return gogit.NewClient(tmp, authOptions, gogit.WithInsecureCredentialsOverHTTP(), gogit.WithDiskStorage())
}
return gogit.NewClient(tmp, authOptions)
case libgit2.ClientName:
if insecure {
return libgit2.NewClient(tmp, authOptions, libgit2.WithInsecureCredentialsOverHTTP, libgit2.WithDiskStorage)
return libgit2.NewClient(tmp, authOptions, libgit2.WithInsecureCredentialsOverHTTP(), libgit2.WithDiskStorage())
}
return libgit2.NewClient(tmp, authOptions)
}
Expand Down

0 comments on commit f70757d

Please sign in to comment.