@@ -109,8 +109,11 @@ var _ = Describe("Metrics", func() {
109
109
BeforeEach (func () {
110
110
updatedSubscription , err := crc .OperatorsV1alpha1 ().Subscriptions (subscription .GetNamespace ()).Get (context .TODO (), subscription .GetName (), metav1.GetOptions {})
111
111
Expect (err ).ToNot (HaveOccurred ())
112
- updatedSubscription .Spec .Channel = betaChannel
113
- updateSubscription (GinkgoT (), crc , updatedSubscription )
112
+
113
+ Eventually (Apply (updatedSubscription , func (s * v1alpha1.Subscription ) error {
114
+ s .Spec .Channel = betaChannel
115
+ return nil
116
+ })).Should (Succeed (), "could not update subscription" )
114
117
})
115
118
116
119
It ("deletes the old Subscription metric and emits the new metric" , func () {
@@ -134,8 +137,12 @@ var _ = Describe("Metrics", func() {
134
137
BeforeEach (func () {
135
138
updatedSubscription , err := crc .OperatorsV1alpha1 ().Subscriptions (subscription .GetNamespace ()).Get (context .TODO (), subscription .GetName (), metav1.GetOptions {})
136
139
Expect (err ).ToNot (HaveOccurred ())
137
- updatedSubscription .Spec .Channel = alphaChannel
138
- updateSubscription (GinkgoT (), crc , updatedSubscription )
140
+
141
+ Eventually (Apply (updatedSubscription , func (s * v1alpha1.Subscription ) error {
142
+ s .Spec .Channel = alphaChannel
143
+ return nil
144
+ })).Should (Succeed (), "could not update subscription" )
145
+
139
146
})
140
147
141
148
It ("deletes the old subscription metric and emits the new metric(there is only one metric for the subscription)" , func () {
0 commit comments