@@ -993,7 +993,7 @@ func TestBucketReconciler_reconcileArtifact(t *testing.T) {
993
993
},
994
994
},
995
995
{
996
- name : "Ignore checksum should be updated when spec ignore changes " ,
996
+ name : "Ignore checksum must be removed when spec ignore is empty " ,
997
997
beforeFunc : func (t * WithT , obj * sourcev1.Bucket , index * etagIndex , dir string ) {
998
998
obj .Spec .Interval = metav1.Duration {Duration : interval }
999
999
obj .Status .IgnoreChecksum = "sha256:539530fbd29c252e357e36ddc065dc7923265e4ea795f09cada03287288f5e7a"
@@ -1006,6 +1006,21 @@ func TestBucketReconciler_reconcileArtifact(t *testing.T) {
1006
1006
* conditions .TrueCondition (sourcev1 .ArtifactInStorageCondition , meta .SucceededReason , "stored artifact for revision 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'" ),
1007
1007
},
1008
1008
},
1009
+ {
1010
+ name : "Ignore checksum should be updated when spec ignore changes" ,
1011
+ beforeFunc : func (t * WithT , obj * sourcev1.Bucket , index * etagIndex , dir string ) {
1012
+ obj .Spec .Interval = metav1.Duration {Duration : interval }
1013
+ obj .Spec .Ignore = pointer .StringPtr ("**.yaml\n " )
1014
+ obj .Status .IgnoreChecksum = "sha256:539530fbd29c252e357e36ddc065dc7923265e4ea795f09cada03287288f5e7a"
1015
+ },
1016
+ afterFunc : func (t * WithT , obj * sourcev1.Bucket , dir string ) {
1017
+ t .Expect (obj .Status .IgnoreChecksum ).To (Equal ("sha256:f4c4021b0b39597f03baee5f45fa6ef3d57c9fae57115ee3a54781b02e3a6cd8" ))
1018
+ },
1019
+ want : sreconcile .ResultSuccess ,
1020
+ assertConditions : []metav1.Condition {
1021
+ * conditions .TrueCondition (sourcev1 .ArtifactInStorageCondition , meta .SucceededReason , "stored artifact for revision 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'" ),
1022
+ },
1023
+ },
1009
1024
}
1010
1025
1011
1026
for _ , tt := range tests {
0 commit comments