Skip to content

Commit cdb6201

Browse files
author
Ankita Thomas
committed
using SSA in metrics_e2e_test
1 parent d1ecc79 commit cdb6201

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/e2e/metrics_e2e_test.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,11 @@ var _ = Describe("Metrics", func() {
109109
BeforeEach(func() {
110110
updatedSubscription, err := crc.OperatorsV1alpha1().Subscriptions(subscription.GetNamespace()).Get(context.TODO(), subscription.GetName(), metav1.GetOptions{})
111111
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")
114117
})
115118

116119
It("deletes the old Subscription metric and emits the new metric", func() {
@@ -134,8 +137,12 @@ var _ = Describe("Metrics", func() {
134137
BeforeEach(func() {
135138
updatedSubscription, err := crc.OperatorsV1alpha1().Subscriptions(subscription.GetNamespace()).Get(context.TODO(), subscription.GetName(), metav1.GetOptions{})
136139
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+
139146
})
140147

141148
It("deletes the old subscription metric and emits the new metric(there is only one metric for the subscription)", func() {

0 commit comments

Comments
 (0)