@@ -75,20 +75,27 @@ func TestRender(t *testing.T) {
75
75
DefaultChannel : "beta" ,
76
76
},
77
77
},
78
+ Channels : []declcfg.Channel {
79
+ {Schema : "olm.channel" , Package : "foo" , Name : "beta" , Entries : []declcfg.ChannelEntry {
80
+ {Name : "foo.v0.1.0" , SkipRange : "<0.1.0" },
81
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
82
+ }},
83
+ {Schema : "olm.channel" , Package : "foo" , Name : "stable" , Entries : []declcfg.ChannelEntry {
84
+ {Name : "foo.v0.1.0" , SkipRange : "<0.1.0" },
85
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
86
+ }},
87
+ },
78
88
Bundles : []declcfg.Bundle {
79
89
{
80
90
Schema : "olm.bundle" ,
81
91
Name : "foo.v0.1.0" ,
82
92
Package : "foo" ,
83
93
Image : "test.registry/foo-operator/foo-bundle:v0.1.0" ,
84
94
Properties : []property.Property {
85
- property .MustBuildChannel ("beta" , "" ),
86
- property .MustBuildChannel ("stable" , "" ),
87
95
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
88
96
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
89
97
property .MustBuildPackage ("foo" , "0.1.0" ),
90
98
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
91
- property .MustBuildSkipRange ("<0.1.0" ),
92
99
property .MustBuildBundleObjectData (foov1csv ),
93
100
property .MustBuildBundleObjectData (foov1crd ),
94
101
},
@@ -110,15 +117,10 @@ func TestRender(t *testing.T) {
110
117
Package : "foo" ,
111
118
Image : "test.registry/foo-operator/foo-bundle:v0.2.0" ,
112
119
Properties : []property.Property {
113
- property .MustBuildChannel ("beta" , "foo.v0.1.0" ),
114
- property .MustBuildChannel ("stable" , "foo.v0.1.0" ),
115
120
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
116
121
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
117
122
property .MustBuildPackage ("foo" , "0.2.0" ),
118
123
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
119
- property .MustBuildSkipRange ("<0.2.0" ),
120
- property .MustBuildSkips ("foo.v0.1.1" ),
121
- property .MustBuildSkips ("foo.v0.1.2" ),
122
124
property .MustBuildBundleObjectData (foov2csv ),
123
125
property .MustBuildBundleObjectData (foov2crd ),
124
126
},
@@ -152,20 +154,27 @@ func TestRender(t *testing.T) {
152
154
DefaultChannel : "beta" ,
153
155
},
154
156
},
157
+ Channels : []declcfg.Channel {
158
+ {Schema : "olm.channel" , Package : "foo" , Name : "beta" , Entries : []declcfg.ChannelEntry {
159
+ {Name : "foo.v0.1.0" , SkipRange : "<0.1.0" },
160
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
161
+ }},
162
+ {Schema : "olm.channel" , Package : "foo" , Name : "stable" , Entries : []declcfg.ChannelEntry {
163
+ {Name : "foo.v0.1.0" , SkipRange : "<0.1.0" },
164
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
165
+ }},
166
+ },
155
167
Bundles : []declcfg.Bundle {
156
168
{
157
169
Schema : "olm.bundle" ,
158
170
Name : "foo.v0.1.0" ,
159
171
Package : "foo" ,
160
172
Image : "test.registry/foo-operator/foo-bundle:v0.1.0" ,
161
173
Properties : []property.Property {
162
- property .MustBuildChannel ("beta" , "" ),
163
- property .MustBuildChannel ("stable" , "" ),
164
174
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
165
175
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
166
176
property .MustBuildPackage ("foo" , "0.1.0" ),
167
177
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
168
- property .MustBuildSkipRange ("<0.1.0" ),
169
178
property .MustBuildBundleObjectData (foov1csv ),
170
179
property .MustBuildBundleObjectData (foov1crd ),
171
180
},
@@ -187,15 +196,10 @@ func TestRender(t *testing.T) {
187
196
Package : "foo" ,
188
197
Image : "test.registry/foo-operator/foo-bundle:v0.2.0" ,
189
198
Properties : []property.Property {
190
- property .MustBuildChannel ("beta" , "foo.v0.1.0" ),
191
- property .MustBuildChannel ("stable" , "foo.v0.1.0" ),
192
199
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
193
200
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
194
201
property .MustBuildPackage ("foo" , "0.2.0" ),
195
202
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
196
- property .MustBuildSkipRange ("<0.2.0" ),
197
- property .MustBuildSkips ("foo.v0.1.1" ),
198
- property .MustBuildSkips ("foo.v0.1.2" ),
199
203
property .MustBuildBundleObjectData (foov2csv ),
200
204
property .MustBuildBundleObjectData (foov2crd ),
201
205
},
@@ -229,19 +233,26 @@ func TestRender(t *testing.T) {
229
233
DefaultChannel : "beta" ,
230
234
},
231
235
},
236
+ Channels : []declcfg.Channel {
237
+ {Schema : "olm.channel" , Package : "foo" , Name : "beta" , Entries : []declcfg.ChannelEntry {
238
+ {Name : "foo.v0.1.0" , SkipRange : "<0.1.0" },
239
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
240
+ }},
241
+ {Schema : "olm.channel" , Package : "foo" , Name : "stable" , Entries : []declcfg.ChannelEntry {
242
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
243
+ }},
244
+ },
232
245
Bundles : []declcfg.Bundle {
233
246
{
234
247
Schema : "olm.bundle" ,
235
248
Name : "foo.v0.1.0" ,
236
249
Package : "foo" ,
237
250
Image : "test.registry/foo-operator/foo-bundle:v0.1.0" ,
238
251
Properties : []property.Property {
239
- property .MustBuildChannel ("beta" , "" ),
240
252
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
241
253
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
242
254
property .MustBuildPackage ("foo" , "0.1.0" ),
243
255
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
244
- property .MustBuildSkipRange ("<0.1.0" ),
245
256
property .MustBuildBundleObjectData (foov1csv ),
246
257
property .MustBuildBundleObjectData (foov1crd ),
247
258
},
@@ -263,15 +274,10 @@ func TestRender(t *testing.T) {
263
274
Package : "foo" ,
264
275
Image : "test.registry/foo-operator/foo-bundle:v0.2.0" ,
265
276
Properties : []property.Property {
266
- property .MustBuildChannel ("beta" , "foo.v0.1.0" ),
267
- property .MustBuildChannel ("stable" , "foo.v0.1.0" ),
268
277
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
269
278
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
270
279
property .MustBuildPackage ("foo" , "0.2.0" ),
271
280
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
272
- property .MustBuildSkipRange ("<0.2.0" ),
273
- property .MustBuildSkips ("foo.v0.1.1" ),
274
- property .MustBuildSkips ("foo.v0.1.2" ),
275
281
property .MustBuildBundleObjectData (foov2csv ),
276
282
property .MustBuildBundleObjectData (foov2crd ),
277
283
},
@@ -305,19 +311,26 @@ func TestRender(t *testing.T) {
305
311
DefaultChannel : "beta" ,
306
312
},
307
313
},
314
+ Channels : []declcfg.Channel {
315
+ {Schema : "olm.channel" , Package : "foo" , Name : "beta" , Entries : []declcfg.ChannelEntry {
316
+ {Name : "foo.v0.1.0" , SkipRange : "<0.1.0" },
317
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
318
+ }},
319
+ {Schema : "olm.channel" , Package : "foo" , Name : "stable" , Entries : []declcfg.ChannelEntry {
320
+ {Name : "foo.v0.2.0" , Replaces : "foo.v0.1.0" , SkipRange : "<0.2.0" , Skips : []string {"foo.v0.1.1" , "foo.v0.1.2" }},
321
+ }},
322
+ },
308
323
Bundles : []declcfg.Bundle {
309
324
{
310
325
Schema : "olm.bundle" ,
311
326
Name : "foo.v0.1.0" ,
312
327
Package : "foo" ,
313
328
Image : "test.registry/foo-operator/foo-bundle:v0.1.0" ,
314
329
Properties : []property.Property {
315
- property .MustBuildChannel ("beta" , "" ),
316
330
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
317
331
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
318
332
property .MustBuildPackage ("foo" , "0.1.0" ),
319
333
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
320
- property .MustBuildSkipRange ("<0.1.0" ),
321
334
property .MustBuildBundleObjectData (foov1csv ),
322
335
property .MustBuildBundleObjectData (foov1crd ),
323
336
},
@@ -339,15 +352,10 @@ func TestRender(t *testing.T) {
339
352
Package : "foo" ,
340
353
Image : "test.registry/foo-operator/foo-bundle:v0.2.0" ,
341
354
Properties : []property.Property {
342
- property .MustBuildChannel ("beta" , "foo.v0.1.0" ),
343
- property .MustBuildChannel ("stable" , "foo.v0.1.0" ),
344
355
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
345
356
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
346
357
property .MustBuildPackage ("foo" , "0.2.0" ),
347
358
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
348
- property .MustBuildSkipRange ("<0.2.0" ),
349
- property .MustBuildSkips ("foo.v0.1.1" ),
350
- property .MustBuildSkips ("foo.v0.1.2" ),
351
359
property .MustBuildBundleObjectData (foov2csv ),
352
360
property .MustBuildBundleObjectData (foov2crd ),
353
361
},
@@ -381,15 +389,10 @@ func TestRender(t *testing.T) {
381
389
Package : "foo" ,
382
390
Image : "test.registry/foo-operator/foo-bundle:v0.2.0" ,
383
391
Properties : []property.Property {
384
- property .MustBuildChannel ("beta" , "foo.v0.1.0" ),
385
- property .MustBuildChannel ("stable" , "foo.v0.1.0" ),
386
392
property .MustBuildGVK ("test.foo" , "v1" , "Foo" ),
387
393
property .MustBuildGVKRequired ("test.bar" , "v1alpha1" , "Bar" ),
388
394
property .MustBuildPackage ("foo" , "0.2.0" ),
389
395
property .MustBuildPackageRequired ("bar" , "<0.1.0" ),
390
- property .MustBuildSkipRange ("<0.2.0" ),
391
- property .MustBuildSkips ("foo.v0.1.1" ),
392
- property .MustBuildSkips ("foo.v0.1.2" ),
393
396
},
394
397
RelatedImages : []declcfg.RelatedImage {
395
398
{
0 commit comments