@@ -160,7 +160,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
160160 protocol : "http" ,
161161 want : ctrl.Result {RequeueAfter : mockInterval },
162162 assertConditions : []metav1.Condition {
163- * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , "SuccessfulCheckout" , "Checked out revision master/<commit> from <url >" ),
163+ * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , sourcev1 . GitOperationSucceedReason , "Checked out revision master/<commit>" ),
164164 },
165165 },
166166 {
@@ -184,7 +184,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
184184 },
185185 want : ctrl.Result {RequeueAfter : mockInterval },
186186 assertConditions : []metav1.Condition {
187- * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , "SuccessfulCheckout" , "Checked out revision master/<commit> from <url >" ),
187+ * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , sourcev1 . GitOperationSucceedReason , "Checked out revision master/<commit>" ),
188188 },
189189 },
190190 {
@@ -208,7 +208,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
208208 },
209209 want : ctrl.Result {RequeueAfter : mockInterval },
210210 assertConditions : []metav1.Condition {
211- * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , "SuccessfulCheckout" , "Checked out revision master/<commit> from <url >" ),
211+ * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , sourcev1 . GitOperationSucceedReason , "Checked out revision master/<commit>" ),
212212 },
213213 },
214214 {
@@ -281,7 +281,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
281281 },
282282 want : ctrl.Result {RequeueAfter : mockInterval },
283283 assertConditions : []metav1.Condition {
284- * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , "SuccessfulCheckout" , "Checked out revision master/<commit> from <url >" ),
284+ * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , sourcev1 . GitOperationSucceedReason , "Checked out revision master/<commit>" ),
285285 },
286286 },
287287 {
@@ -305,7 +305,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
305305 },
306306 want : ctrl.Result {RequeueAfter : mockInterval },
307307 assertConditions : []metav1.Condition {
308- * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , "SuccessfulCheckout" , "Checked out revision master/<commit> from <url >" ),
308+ * conditions .TrueCondition (sourcev1 .SourceAvailableCondition , sourcev1 . GitOperationSucceedReason , "Checked out revision master/<commit>" ),
309309 },
310310 },
311311 {
@@ -319,7 +319,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
319319 },
320320 want : ctrl.Result {RequeueAfter : mockInterval },
321321 assertConditions : []metav1.Condition {
322- * conditions .FalseCondition (sourcev1 .SourceAvailableCondition , "AuthenticationFailed" , "Failed to get auth secret /non-existing: secrets \" non-existing\" not found" ),
322+ * conditions .FalseCondition (sourcev1 .SourceAvailableCondition , "AuthenticationFailed" , "Failed to get secret /non-existing: secrets \" non-existing\" not found" ),
323323 },
324324 },
325325 }
@@ -593,7 +593,7 @@ func TestGitRepositoryReconciler_reconcileArtifact(t *testing.T) {
593593 },
594594 want : ctrl.Result {RequeueAfter : mockInterval },
595595 assertConditions : []metav1.Condition {
596- * conditions .TrueCondition (sourcev1 .ArtifactAvailableCondition , "ArchivedArtifact" , "Artifact revision main/revision" ),
596+ * conditions .TrueCondition (sourcev1 .ArtifactAvailableCondition , "ArchivedArtifact" , "Compressed source to artifact with revision main/revision" ),
597597 },
598598 },
599599 {
@@ -625,7 +625,7 @@ func TestGitRepositoryReconciler_reconcileArtifact(t *testing.T) {
625625 },
626626 want : ctrl.Result {RequeueAfter : mockInterval },
627627 assertConditions : []metav1.Condition {
628- * conditions .TrueCondition (sourcev1 .ArtifactAvailableCondition , "ArchivedArtifact" , "Archived artifact revision main/revision" ),
628+ * conditions .TrueCondition (sourcev1 .ArtifactAvailableCondition , "ArchivedArtifact" , "Compressed source to artifact with revision main/revision" ),
629629 },
630630 },
631631 }
@@ -1054,6 +1054,12 @@ func TestMain(m *testing.M) {
10541054
10551055 eventsHelper = controller .MakeEvents (newTestEnv , "test" , nil )
10561056 metricsHelper = controller .MustMakeMetrics (newTestEnv )
1057+ getters := getter.Providers {
1058+ getter.Provider {
1059+ Schemes : []string {"http" , "https" },
1060+ New : getter .NewHTTPGetter ,
1061+ },
1062+ }
10571063
10581064 if err := (& GitRepositoryReconciler {
10591065 Client : newTestEnv ,
@@ -1068,12 +1074,7 @@ func TestMain(m *testing.M) {
10681074 Client : newTestEnv ,
10691075 Events : eventsHelper ,
10701076 Metrics : metricsHelper ,
1071- Getters : getter.Providers {
1072- getter.Provider {
1073- Schemes : []string {"http" , "https" },
1074- New : getter .NewHTTPGetter ,
1075- },
1076- },
1077+ Getters : getters ,
10771078 Storage : storage ,
10781079 }).SetupWithManager (newTestEnv ); err != nil {
10791080 panic (fmt .Sprintf ("Failed to start HelmRepositoryReconciler: %v" , err ))
@@ -1088,6 +1089,16 @@ func TestMain(m *testing.M) {
10881089 panic (fmt .Sprintf ("Failed to start BucketReconciler: %v" , err ))
10891090 }
10901091
1092+ if err := (& HelmChartReconciler {
1093+ Client : newTestEnv ,
1094+ Events : eventsHelper ,
1095+ Metrics : metricsHelper ,
1096+ Getters : getters ,
1097+ Storage : storage ,
1098+ }).SetupWithManager (newTestEnv ); err != nil {
1099+ panic (fmt .Sprintf ("Failed to start HelmChartReconciler: %v" , err ))
1100+ }
1101+
10911102 go func () {
10921103 fmt .Println ("Starting the test environment manager" )
10931104 if err := newTestEnv .StartManager (ctx ); err != nil {
0 commit comments