diff --git a/Makefile b/Makefile index fa6d8d271..549bf7f62 100644 --- a/Makefile +++ b/Makefile @@ -96,6 +96,7 @@ build: check-deps $(LIBGIT2) ## Build manager binary KUBEBUILDER_ASSETS?="$(shell $(ENVTEST) --arch=$(ENVTEST_ARCH) use -i $(ENVTEST_KUBERNETES_VERSION) --bin-dir=$(ENVTEST_ASSETS_DIR) -p path)" test: $(LIBGIT2) install-envtest test-api check-deps ## Run tests KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) \ + GIT_CONFIG_GLOBAL=/dev/null \ go test $(GO_STATIC_FLAGS) ./... -coverprofile cover.out check-deps: @@ -268,3 +269,4 @@ env: $(LIBGIT2) echo 'CGO_CFLAGS="$(CGO_CFLAGS)"' >> $(BUILD_DIR)/.env echo 'CGO_LDFLAGS="$(CGO_LDFLAGS)"' >> $(BUILD_DIR)/.env echo 'KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS)' >> $(BUILD_DIR)/.env + echo 'GIT_CONFIG_GLOBAL=/dev/null' >> $(BUILD_DIR)/.env diff --git a/controllers/gitrepository_controller_test.go b/controllers/gitrepository_controller_test.go index c0ac46068..fb020d7ca 100644 --- a/controllers/gitrepository_controller_test.go +++ b/controllers/gitrepository_controller_test.go @@ -434,7 +434,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) { }, Spec: sourcev1.GitRepositorySpec{ Interval: metav1.Duration{Duration: interval}, - Timeout: &metav1.Duration{Duration: interval}, + Timeout: &metav1.Duration{Duration: timeout}, }, } @@ -653,7 +653,7 @@ func TestGitRepositoryReconciler_reconcileSource_checkoutStrategy(t *testing.T) }, Spec: sourcev1.GitRepositorySpec{ Interval: metav1.Duration{Duration: interval}, - Timeout: &metav1.Duration{Duration: interval}, + Timeout: &metav1.Duration{Duration: timeout}, URL: server.HTTPAddress() + repoPath, Reference: tt.reference, }, @@ -1517,7 +1517,7 @@ func TestGitRepositoryReconciler_ConditionsUpdate(t *testing.T) { URL: server.HTTPAddress() + repoPath, GitImplementation: sourcev1.GoGitImplementation, Interval: metav1.Duration{Duration: interval}, - Timeout: &metav1.Duration{Duration: interval}, + Timeout: &metav1.Duration{Duration: timeout}, }, } diff --git a/controllers/helmrepository_controller_test.go b/controllers/helmrepository_controller_test.go index 7a1e5d593..97934d509 100644 --- a/controllers/helmrepository_controller_test.go +++ b/controllers/helmrepository_controller_test.go @@ -440,7 +440,7 @@ func TestHelmRepositoryReconciler_reconcileSource(t *testing.T) { }, Spec: sourcev1.HelmRepositorySpec{ Interval: metav1.Duration{Duration: interval}, - Timeout: &metav1.Duration{Duration: interval}, + Timeout: &metav1.Duration{Duration: timeout}, }, }