@@ -390,8 +390,8 @@ func TestOCIRepository_reconcileSource_authStrategy(t *testing.T) {
390
390
name : "HTTP without basic auth" ,
391
391
want : sreconcile .ResultSuccess ,
392
392
assertConditions : []metav1.Condition {
393
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
394
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
393
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
394
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
395
395
},
396
396
},
397
397
{
@@ -411,8 +411,8 @@ func TestOCIRepository_reconcileSource_authStrategy(t *testing.T) {
411
411
includeSecret : true ,
412
412
},
413
413
assertConditions : []metav1.Condition {
414
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
415
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
414
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
415
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
416
416
},
417
417
},
418
418
{
@@ -432,8 +432,8 @@ func TestOCIRepository_reconcileSource_authStrategy(t *testing.T) {
432
432
includeSA : true ,
433
433
},
434
434
assertConditions : []metav1.Condition {
435
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
436
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
435
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
436
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
437
437
},
438
438
},
439
439
{
@@ -515,8 +515,8 @@ func TestOCIRepository_reconcileSource_authStrategy(t *testing.T) {
515
515
},
516
516
},
517
517
assertConditions : []metav1.Condition {
518
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
519
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
518
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
519
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
520
520
},
521
521
},
522
522
{
@@ -587,8 +587,8 @@ func TestOCIRepository_reconcileSource_authStrategy(t *testing.T) {
587
587
},
588
588
provider : "azure" ,
589
589
assertConditions : []metav1.Condition {
590
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
591
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
590
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
591
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
592
592
},
593
593
},
594
594
}
@@ -873,8 +873,8 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
873
873
want : sreconcile .ResultSuccess ,
874
874
wantRevision : fmt .Sprintf ("latest/%s" , img6 .digest .Hex ),
875
875
assertConditions : []metav1.Condition {
876
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest " ),
877
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest " ),
876
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision " ),
877
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision " ),
878
878
},
879
879
},
880
880
{
@@ -885,8 +885,8 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
885
885
want : sreconcile .ResultSuccess ,
886
886
wantRevision : fmt .Sprintf ("%s/%s" , img6 .tag , img6 .digest .Hex ),
887
887
assertConditions : []metav1.Condition {
888
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest " ),
889
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest " ),
888
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision " ),
889
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision " ),
890
890
},
891
891
},
892
892
{
@@ -897,8 +897,8 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
897
897
want : sreconcile .ResultSuccess ,
898
898
wantRevision : fmt .Sprintf ("%s/%s" , img6 .tag , img6 .digest .Hex ),
899
899
assertConditions : []metav1.Condition {
900
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest " ),
901
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest " ),
900
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision " ),
901
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision " ),
902
902
},
903
903
},
904
904
{
@@ -909,8 +909,8 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
909
909
wantRevision : img6 .digest .Hex ,
910
910
want : sreconcile .ResultSuccess ,
911
911
assertConditions : []metav1.Condition {
912
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest " ),
913
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest " ),
912
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision " ),
913
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision " ),
914
914
},
915
915
},
916
916
{
@@ -955,8 +955,8 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
955
955
want : sreconcile .ResultSuccess ,
956
956
wantRevision : fmt .Sprintf ("%s/%s" , img6 .tag , img6 .digest .Hex ),
957
957
assertConditions : []metav1.Condition {
958
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest " ),
959
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest " ),
958
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision " ),
959
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision " ),
960
960
},
961
961
},
962
962
{
@@ -969,8 +969,8 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
969
969
want : sreconcile .ResultSuccess ,
970
970
wantRevision : img5 .digest .Hex ,
971
971
assertConditions : []metav1.Condition {
972
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest " ),
973
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest " ),
972
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision " ),
973
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision " ),
974
974
},
975
975
},
976
976
}
@@ -1049,9 +1049,9 @@ func TestOCIRepository_reconcileSource_verifyOCISourceSignature(t *testing.T) {
1049
1049
shouldSign : true ,
1050
1050
want : sreconcile .ResultSuccess ,
1051
1051
assertConditions : []metav1.Condition {
1052
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
1053
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
1054
- * conditions .TrueCondition (sourcev1 .SourceVerifiedCondition , meta .SucceededReason , "verified signature of digest <digest>" ),
1052
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
1053
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
1054
+ * conditions .TrueCondition (sourcev1 .SourceVerifiedCondition , meta .SucceededReason , "verified signature of revision <digest>" ),
1055
1055
},
1056
1056
},
1057
1057
{
@@ -1064,8 +1064,8 @@ func TestOCIRepository_reconcileSource_verifyOCISourceSignature(t *testing.T) {
1064
1064
wantErrMsg : "failed to verify the signature using provider 'cosign': no matching signatures were found for '<url>'" ,
1065
1065
want : sreconcile .ResultEmpty ,
1066
1066
assertConditions : []metav1.Condition {
1067
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
1068
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
1067
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
1068
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
1069
1069
* conditions .FalseCondition (sourcev1 .SourceVerifiedCondition , sourcev1 .VerificationError , "failed to verify the signature using provider '<provider>': no matching signatures were found for '<url>'" ),
1070
1070
},
1071
1071
},
@@ -1079,8 +1079,8 @@ func TestOCIRepository_reconcileSource_verifyOCISourceSignature(t *testing.T) {
1079
1079
want : sreconcile .ResultEmpty ,
1080
1080
keyless : true ,
1081
1081
assertConditions : []metav1.Condition {
1082
- * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
1083
- * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest '<digest>' for '<url>'" ),
1082
+ * conditions .TrueCondition (meta .ReconcilingCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
1083
+ * conditions .TrueCondition (sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision '<digest>' for '<url>'" ),
1084
1084
* conditions .FalseCondition (sourcev1 .SourceVerifiedCondition , sourcev1 .VerificationError , "failed to verify the signature using provider '<provider> keyless': no matching signatures" ),
1085
1085
},
1086
1086
},
@@ -1109,7 +1109,7 @@ func TestOCIRepository_reconcileSource_verifyOCISourceSignature(t *testing.T) {
1109
1109
},
1110
1110
want : sreconcile .ResultSuccess ,
1111
1111
assertConditions : []metav1.Condition {
1112
- * conditions .TrueCondition (sourcev1 .SourceVerifiedCondition , meta .SucceededReason , "verified signature of digest <digest>" ),
1112
+ * conditions .TrueCondition (sourcev1 .SourceVerifiedCondition , meta .SucceededReason , "verified signature of revision <digest>" ),
1113
1113
},
1114
1114
},
1115
1115
{
@@ -1258,7 +1258,7 @@ func TestOCIRepository_reconcileArtifact(t *testing.T) {
1258
1258
Revision : "revision" ,
1259
1259
},
1260
1260
beforeFunc : func (obj * sourcev1.OCIRepository ) {
1261
- conditions .MarkTrue (obj , sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new digest " )
1261
+ conditions .MarkTrue (obj , sourcev1 .ArtifactOutdatedCondition , "NewRevision" , "new revision " )
1262
1262
},
1263
1263
want : sreconcile .ResultSuccess ,
1264
1264
assertPaths : []string {
@@ -1698,7 +1698,7 @@ func TestOCIRepositoryReconciler_notify(t *testing.T) {
1698
1698
},
1699
1699
}
1700
1700
},
1701
- wantEvent : "Normal NewArtifact stored artifact with digest 'xxx' from 'oci://newurl.io', origin source 'https://github.com/stefanprodan/podinfo', origin revision '6.1.8/b3b00fe35424a45d373bf4c7214178bc36fd7872'" ,
1701
+ wantEvent : "Normal NewArtifact stored artifact with revision 'xxx' from 'oci://newurl.io', origin source 'https://github.com/stefanprodan/podinfo', origin revision '6.1.8/b3b00fe35424a45d373bf4c7214178bc36fd7872'" ,
1702
1702
},
1703
1703
{
1704
1704
name : "recovery from failure" ,
@@ -1714,7 +1714,7 @@ func TestOCIRepositoryReconciler_notify(t *testing.T) {
1714
1714
obj .Status .Artifact = & sourcev1.Artifact {Revision : "xxx" , Checksum : "yyy" }
1715
1715
conditions .MarkTrue (obj , meta .ReadyCondition , meta .SucceededReason , "ready" )
1716
1716
},
1717
- wantEvent : "Normal Succeeded stored artifact with digest 'xxx' from 'oci://newurl.io'" ,
1717
+ wantEvent : "Normal Succeeded stored artifact with revision 'xxx' from 'oci://newurl.io'" ,
1718
1718
},
1719
1719
{
1720
1720
name : "recovery and new artifact" ,
@@ -1730,7 +1730,7 @@ func TestOCIRepositoryReconciler_notify(t *testing.T) {
1730
1730
obj .Status .Artifact = & sourcev1.Artifact {Revision : "aaa" , Checksum : "bbb" }
1731
1731
conditions .MarkTrue (obj , meta .ReadyCondition , meta .SucceededReason , "ready" )
1732
1732
},
1733
- wantEvent : "Normal NewArtifact stored artifact with digest 'aaa' from 'oci://newurl.io'" ,
1733
+ wantEvent : "Normal NewArtifact stored artifact with revision 'aaa' from 'oci://newurl.io'" ,
1734
1734
},
1735
1735
{
1736
1736
name : "no updates" ,
0 commit comments