@@ -69,8 +69,10 @@ import (
69
69
70
70
sourcev1 "github.com/fluxcd/source-controller/api/v1"
71
71
ociv1 "github.com/fluxcd/source-controller/api/v1beta2"
72
+ sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2"
72
73
intdigest "github.com/fluxcd/source-controller/internal/digest"
73
74
serror "github.com/fluxcd/source-controller/internal/error"
75
+ soci "github.com/fluxcd/source-controller/internal/oci"
74
76
snotation "github.com/fluxcd/source-controller/internal/oci/notation"
75
77
sreconcile "github.com/fluxcd/source-controller/internal/reconcile"
76
78
)
@@ -795,11 +797,15 @@ func TestOCIRepository_reconcileSource_authStrategy(t *testing.T) {
795
797
obj .Spec .Insecure = true
796
798
}
797
799
800
+ authenticator , er := soci .NewOIDCAuthenticator (soci .WithCacheCapacity (1 ))
801
+ g .Expect (er ).NotTo (HaveOccurred ())
802
+
798
803
r := & OCIRepositoryReconciler {
799
- Client : clientBuilder .Build (),
800
- EventRecorder : record .NewFakeRecorder (32 ),
801
- Storage : testStorage ,
802
- patchOptions : getPatchOptions (ociRepositoryReadyCondition .Owned , "sc" ),
804
+ Client : clientBuilder .Build (),
805
+ EventRecorder : record .NewFakeRecorder (32 ),
806
+ Storage : testStorage ,
807
+ OIDCAuthenticator : authenticator ,
808
+ patchOptions : getPatchOptions (ociRepositoryReadyCondition .Owned , "sc" ),
803
809
}
804
810
805
811
opts := makeRemoteOptions (ctx , makeTransport (tt .insecure ), authn .DefaultKeychain , nil )
@@ -1147,6 +1153,7 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
1147
1153
Interval : metav1.Duration {Duration : interval },
1148
1154
Timeout : & metav1.Duration {Duration : timeout },
1149
1155
Insecure : true ,
1156
+ Provider : sourcev1beta2 .GenericOCIProvider ,
1150
1157
},
1151
1158
}
1152
1159
@@ -1398,6 +1405,7 @@ func TestOCIRepository_reconcileSource_verifyOCISourceSignatureNotation(t *testi
1398
1405
},
1399
1406
Interval : metav1.Duration {Duration : interval },
1400
1407
Timeout : & metav1.Duration {Duration : timeout },
1408
+ Provider : sourcev1beta2 .GenericOCIProvider ,
1401
1409
},
1402
1410
}
1403
1411
@@ -1718,6 +1726,7 @@ func TestOCIRepository_reconcileSource_verifyOCISourceTrustPolicyNotation(t *tes
1718
1726
},
1719
1727
Interval : metav1.Duration {Duration : interval },
1720
1728
Timeout : & metav1.Duration {Duration : timeout },
1729
+ Provider : sourcev1beta2 .GenericOCIProvider ,
1721
1730
},
1722
1731
}
1723
1732
@@ -2042,6 +2051,7 @@ func TestOCIRepository_reconcileSource_verifyOCISourceSignatureCosign(t *testing
2042
2051
},
2043
2052
Interval : metav1.Duration {Duration : interval },
2044
2053
Timeout : & metav1.Duration {Duration : timeout },
2054
+ Provider : sourcev1beta2 .GenericOCIProvider ,
2045
2055
},
2046
2056
}
2047
2057
@@ -2265,6 +2275,7 @@ func TestOCIRepository_reconcileSource_verifyOCISourceSignature_keyless(t *testi
2265
2275
},
2266
2276
Interval : metav1.Duration {Duration : interval },
2267
2277
Timeout : & metav1.Duration {Duration : timeout },
2278
+ Provider : sourcev1beta2 .GenericOCIProvider ,
2268
2279
Reference : tt .reference ,
2269
2280
},
2270
2281
}
@@ -2448,6 +2459,7 @@ func TestOCIRepository_reconcileSource_noop(t *testing.T) {
2448
2459
Reference : & ociv1.OCIRepositoryRef {Tag : "6.1.5" },
2449
2460
Interval : metav1.Duration {Duration : interval },
2450
2461
Timeout : & metav1.Duration {Duration : timeout },
2462
+ Provider : sourcev1beta2 .GenericOCIProvider ,
2451
2463
Insecure : true ,
2452
2464
},
2453
2465
}
0 commit comments