Skip to content

Commit

Permalink
build: Fix e2e tests broken after #402
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
  • Loading branch information
Paulo Gomes committed Nov 15, 2022
1 parent 286ec55 commit 5723219
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 5723219

Please sign in to comment.