File tree Expand file tree Collapse file tree 2 files changed +14
-17
lines changed Expand file tree Collapse file tree 2 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -232,13 +232,6 @@ func (b *Bundle) Validate() error {
232232 if b .Channel != nil && b .Package != nil && b .Package != b .Channel .Package {
233233 result .subErrors = append (result .subErrors , errors .New ("package does not match channel's package" ))
234234 }
235- if b .Replaces != "" {
236- if b .Channel != nil && b .Channel .Bundles != nil {
237- if _ , ok := b .Channel .Bundles [b .Replaces ]; ! ok {
238- result .subErrors = append (result .subErrors , fmt .Errorf ("replaces %q not found in channel" , b .Replaces ))
239- }
240- }
241- }
242235 props , err := property .Parse (b .Properties )
243236 if err != nil {
244237 result .subErrors = append (result .subErrors , err )
Original file line number Diff line number Diff line change @@ -378,6 +378,20 @@ func TestValidators(t *testing.T) {
378378 },
379379 assertion : require .NoError ,
380380 },
381+ {
382+ name : "Bundle/Success/ReplacesNotInChannel" ,
383+ v : & Bundle {
384+ Package : pkg ,
385+ Channel : ch ,
386+ Name : "anakin.v0.1.0" ,
387+ Image : "registry.io/image" ,
388+ Replaces : "anakin.v0.0.0" ,
389+ Properties : []property.Property {
390+ property .MustBuildPackage ("anakin" , "0.1.0" ),
391+ },
392+ },
393+ assertion : require .NoError ,
394+ },
381395 {
382396 name : "Bundle/Success/NoBundleImage/HaveBundleData" ,
383397 v : & Bundle {
@@ -440,16 +454,6 @@ func TestValidators(t *testing.T) {
440454 },
441455 assertion : require .Error ,
442456 },
443- {
444- name : "Bundle/Error/ReplacesNotInChannel" ,
445- v : & Bundle {
446- Package : pkg ,
447- Channel : ch ,
448- Name : "anakin.v0.1.0" ,
449- Replaces : "anakin.v0.0.0" ,
450- },
451- assertion : require .Error ,
452- },
453457 {
454458 name : "Bundle/Error/InvalidProperty" ,
455459 v : & Bundle {
You can’t perform that action at this time.
0 commit comments