@@ -42,13 +42,11 @@ import (
4242
4343const testRepositoryPath = "../testdata/git/repo"
4444
45- func TestMain (m * testing.M ) {
46- managed .InitManagedTransport (logr .Discard ())
47- }
48-
4945// Test_ManagedSSH_KeyTypes assures support for the different
5046// types of keys for SSH Authentication supported by Flux.
5147func Test_ManagedSSH_KeyTypes (t * testing.T ) {
48+ managed .InitManagedTransport (logr .Discard ())
49+
5250 tests := []struct {
5351 name string
5452 keyType ssh.KeyPairType
@@ -176,6 +174,8 @@ func Test_ManagedSSH_KeyTypes(t *testing.T) {
176174// Test_ManagedSSH_KeyExchangeAlgos assures support for the different
177175// types of SSH key exchange algorithms supported by Flux.
178176func Test_ManagedSSH_KeyExchangeAlgos (t * testing.T ) {
177+ managed .InitManagedTransport (logr .Discard ())
178+
179179 tests := []struct {
180180 name string
181181 ClientKex []string
@@ -297,6 +297,8 @@ func Test_ManagedSSH_KeyExchangeAlgos(t *testing.T) {
297297// Test_ManagedSSH_HostKeyAlgos assures support for the different
298298// types of SSH Host Key algorithms supported by Flux.
299299func Test_ManagedSSH_HostKeyAlgos (t * testing.T ) {
300+ managed .InitManagedTransport (logr .Discard ())
301+
300302 tests := []struct {
301303 name string
302304 keyType ssh.KeyPairType
@@ -457,6 +459,7 @@ func Test_ManagedSSH_HostKeyAlgos(t *testing.T) {
457459}
458460
459461func Test_ManagedHTTPCheckout (t * testing.T ) {
462+ managed .InitManagedTransport (logr .Discard ())
460463 g := NewWithT (t )
461464
462465 timeout := 5 * time .Second
@@ -496,6 +499,7 @@ func Test_ManagedHTTPCheckout(t *testing.T) {
496499}
497500
498501func TestManagedCheckoutBranch_Checkout (t * testing.T ) {
502+ managed .InitManagedTransport (logr .Discard ())
499503 g := NewWithT (t )
500504
501505 timeout := 5 * time .Second
@@ -551,6 +555,7 @@ func TestManagedCheckoutBranch_Checkout(t *testing.T) {
551555}
552556
553557func TestManagedCheckoutTag_Checkout (t * testing.T ) {
558+ managed .InitManagedTransport (logr .Discard ())
554559 g := NewWithT (t )
555560
556561 timeout := 5 * time .Second
0 commit comments