Skip to content

Commit

Permalink
Merge pull request #777 from aryan9600/refactor-tests
Browse files Browse the repository at this point in the history
libgit2: refactor tests to use managed and unmanaged transport cleanly
  • Loading branch information
darkowlzz committed Jun 9, 2022
2 parents 1faa547 + 45ee564 commit f6a389c
Show file tree
Hide file tree
Showing 5 changed files with 296 additions and 262 deletions.
3 changes: 3 additions & 0 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/fluxcd/pkg/runtime/controller"
feathelper "github.com/fluxcd/pkg/runtime/features"
"github.com/fluxcd/pkg/runtime/testenv"
"github.com/fluxcd/pkg/testserver"
"github.com/go-logr/logr"
Expand Down Expand Up @@ -206,6 +207,8 @@ func TestMain(m *testing.M) {
panic(fmt.Sprintf("Failed to create a test registry server: %v", err))
}

fg := feathelper.FeatureGates{}
fg.SupportedFeatures(features.FeatureGates())
managed.InitManagedTransport(logr.Discard())

if err := (&GitRepositoryReconciler{
Expand Down
Loading

0 comments on commit f6a389c

Please sign in to comment.