@@ -157,9 +157,6 @@ var _ = Describe("lifecycle", Ordered, Label("firewalls", "lifecycle"), func() {
157157 Path (Result ("create requeues" , func (ctx context.Context , mck Mock ) {
158158 res , err := reconciler .reconcile (ctx , mck .Logger (), & fwScope )
159159 Expect (err ).NotTo (HaveOccurred ())
160- // first one is for pause
161- res , err = reconciler .reconcile (ctx , mck .Logger (), & fwScope )
162- Expect (err ).NotTo (HaveOccurred ())
163160 Expect (res .RequeueAfter ).To (Equal (rec .DefaultFWControllerReconcilerDelay ))
164161 Expect (mck .Logs ()).To (ContainSubstring ("re-queuing Firewall create" ))
165162 })),
@@ -197,9 +194,6 @@ var _ = Describe("lifecycle", Ordered, Label("firewalls", "lifecycle"), func() {
197194 Result ("success" , func (ctx context.Context , mck Mock ) {
198195 _ , err := reconciler .reconcile (ctx , mck .Logger (), & fwScope )
199196 Expect (err ).NotTo (HaveOccurred ())
200- // once more after pause
201- _ , err = reconciler .reconcile (ctx , mck .Logger (), & fwScope )
202- Expect (err ).NotTo (HaveOccurred ())
203197 Expect (k8sClient .Get (ctx , fwObjectKey , & linodeFW )).To (Succeed ())
204198 Expect (* linodeFW .Spec .FirewallID ).To (Equal (1 ))
205199 Expect (mck .Logs ()).NotTo (ContainSubstring ("failed to create Firewall" ))
@@ -214,18 +208,14 @@ var _ = Describe("lifecycle", Ordered, Label("firewalls", "lifecycle"), func() {
214208 }),
215209 OneOf (
216210 Path (Result ("update requeues for update rules error" , func (ctx context.Context , mck Mock ) {
217- mck .LinodeClient .EXPECT ().UpdateFirewallRules (ctx , 1 , gomock .Any ()).Return (nil , & linodego.Error {Code : http .StatusInternalServerError })
218- res , err := reconciler .reconcile (ctx , mck .Logger (), & fwScope )
219- Expect (err ).NotTo (HaveOccurred ())
220-
221211 conditions .Set (fwScope .LinodeFirewall , metav1.Condition {
222212 Type : string (clusterv1 .ReadyCondition ),
223213 Status : metav1 .ConditionFalse ,
224214 Reason : "test" ,
225215 Message : "test" ,
226216 })
227- // after pause is done, do the real reconcile
228- res , err = reconciler .reconcile (ctx , mck .Logger (), & fwScope )
217+ mck . LinodeClient . EXPECT (). UpdateFirewallRules ( ctx , 1 , gomock . Any ()). Return ( nil , & linodego. Error { Code : http . StatusInternalServerError })
218+ res , err : = reconciler .reconcile (ctx , mck .Logger (), & fwScope )
229219 Expect (err ).NotTo (HaveOccurred ())
230220 Expect (res .RequeueAfter ).To (Equal (rec .DefaultFWControllerReconcilerDelay ))
231221 Expect (mck .Logs ()).To (ContainSubstring ("re-queuing Firewall update" ))
@@ -290,18 +280,12 @@ var _ = Describe("lifecycle", Ordered, Label("firewalls", "lifecycle"), func() {
290280 Path (Result ("deletes are requeued" , func (ctx context.Context , mck Mock ) {
291281 res , err := reconciler .reconcile (ctx , mck .Logger (), & fwScope )
292282 Expect (err ).NotTo (HaveOccurred ())
293- // Now do it after the pause is done
294- res , err = reconciler .reconcile (ctx , mck .Logger (), & fwScope )
295- Expect (err ).NotTo (HaveOccurred ())
296283 Expect (res .RequeueAfter ).To (Equal (rec .DefaultFWControllerReconcilerDelay ))
297284 Expect (mck .Logs ()).To (ContainSubstring ("failed to delete Firewall" ))
298285 })),
299286 Path (Result ("timeout error" , func (ctx context.Context , mck Mock ) {
300287 reconciler .ReconcileTimeout = time .Nanosecond
301288 res , err := reconciler .reconcile (ctx , mck .Logger (), & fwScope )
302- Expect (err ).NotTo (HaveOccurred ())
303- // Now pause is done
304- res , err = reconciler .reconcile (ctx , mck .Logger (), & fwScope )
305289 Expect (err ).To (HaveOccurred ())
306290 Expect (res .RequeueAfter ).To (Equal (time .Duration (0 )))
307291 })),
0 commit comments