@@ -42,13 +42,11 @@ import (
42
42
43
43
const testRepositoryPath = "../testdata/git/repo"
44
44
45
- func TestMain (m * testing.M ) {
46
- managed .InitManagedTransport (logr .Discard ())
47
- }
48
-
49
45
// Test_ManagedSSH_KeyTypes assures support for the different
50
46
// types of keys for SSH Authentication supported by Flux.
51
47
func Test_ManagedSSH_KeyTypes (t * testing.T ) {
48
+ managed .InitManagedTransport (logr .Discard ())
49
+
52
50
tests := []struct {
53
51
name string
54
52
keyType ssh.KeyPairType
@@ -176,6 +174,8 @@ func Test_ManagedSSH_KeyTypes(t *testing.T) {
176
174
// Test_ManagedSSH_KeyExchangeAlgos assures support for the different
177
175
// types of SSH key exchange algorithms supported by Flux.
178
176
func Test_ManagedSSH_KeyExchangeAlgos (t * testing.T ) {
177
+ managed .InitManagedTransport (logr .Discard ())
178
+
179
179
tests := []struct {
180
180
name string
181
181
ClientKex []string
@@ -297,6 +297,8 @@ func Test_ManagedSSH_KeyExchangeAlgos(t *testing.T) {
297
297
// Test_ManagedSSH_HostKeyAlgos assures support for the different
298
298
// types of SSH Host Key algorithms supported by Flux.
299
299
func Test_ManagedSSH_HostKeyAlgos (t * testing.T ) {
300
+ managed .InitManagedTransport (logr .Discard ())
301
+
300
302
tests := []struct {
301
303
name string
302
304
keyType ssh.KeyPairType
@@ -457,6 +459,7 @@ func Test_ManagedSSH_HostKeyAlgos(t *testing.T) {
457
459
}
458
460
459
461
func Test_ManagedHTTPCheckout (t * testing.T ) {
462
+ managed .InitManagedTransport (logr .Discard ())
460
463
g := NewWithT (t )
461
464
462
465
timeout := 5 * time .Second
@@ -496,6 +499,7 @@ func Test_ManagedHTTPCheckout(t *testing.T) {
496
499
}
497
500
498
501
func TestManagedCheckoutBranch_Checkout (t * testing.T ) {
502
+ managed .InitManagedTransport (logr .Discard ())
499
503
g := NewWithT (t )
500
504
501
505
timeout := 5 * time .Second
@@ -551,6 +555,7 @@ func TestManagedCheckoutBranch_Checkout(t *testing.T) {
551
555
}
552
556
553
557
func TestManagedCheckoutTag_Checkout (t * testing.T ) {
558
+ managed .InitManagedTransport (logr .Discard ())
554
559
g := NewWithT (t )
555
560
556
561
timeout := 5 * time .Second
0 commit comments