@@ -42,6 +42,7 @@ var _ = Describe("File-based catalog images", Ordered, func() {
42
42
var bundles []olm.Bundle
43
43
var channels []olm.Channel
44
44
var packages []olm.Package
45
+ var deprecation olm.Deprecation
45
46
46
47
It ("extract catalog.json" , func () {
47
48
dir , err := os .MkdirTemp ("" , key )
@@ -65,6 +66,8 @@ var _ = Describe("File-based catalog images", Ordered, func() {
65
66
channels = append (channels , typedObj )
66
67
case olm.Package :
67
68
packages = append (packages , typedObj )
69
+ case olm.Deprecation :
70
+ deprecation = typedObj
68
71
}
69
72
}
70
73
@@ -88,7 +91,7 @@ var _ = Describe("File-based catalog images", Ordered, func() {
88
91
})
89
92
90
93
It ("verify channels" , func () {
91
- expectedChannels := []string {"stable" , "candidate -v1.1.0 " , "stable-v1.0" }
94
+ expectedChannels := []string {"stable" , "stable -v1.1" , "stable-v1.0" }
92
95
Expect (channels ).To (HaveLen (len (expectedChannels )))
93
96
94
97
for _ , channel := range channels {
@@ -110,6 +113,14 @@ var _ = Describe("File-based catalog images", Ordered, func() {
110
113
Expect (exists ).To (BeTrue (), fmt .Sprintf ("olm bundle with %s hash not found" , bundleImageHash ))
111
114
})
112
115
116
+ It ("verify deprecations" , func () {
117
+ expectedDeprecations := []string {"stable-v1.0" , "rhtas-operator.v1.0.0" , "rhtas-operator.v1.0.1" , "rhtas-operator.v1.0.2" }
118
+ Expect (deprecation .Entries ).To (HaveLen (len (expectedDeprecations )))
119
+
120
+ for _ , entry := range deprecation .Entries {
121
+ Expect (expectedDeprecations ).To (ContainElement (entry .Reference .Name ))
122
+ }
123
+ })
113
124
},
114
125
ocps )
115
126
})
0 commit comments