Remove redundant if statement

This commit is contained in:
Volodymyr Zotov
2025-08-26 16:33:49 -05:00
parent 0c3caf88b6
commit b1b6c97a88

View File

@@ -2,7 +2,6 @@ package kube
import ( import (
"context" "context"
"fmt"
"time" "time"
//nolint:staticcheck // ST1001 //nolint:staticcheck // ST1001
@@ -110,10 +109,6 @@ func (d *Deployment) WaitDeploymentRolledOut(ctx context.Context) {
Eventually(func(g Gomega) error { Eventually(func(g Gomega) error {
newDeployment := d.Get(ctx) newDeployment := d.Get(ctx)
// Has controller observed the new spec?
if newDeployment.Status.ObservedGeneration < targetGen {
return fmt.Errorf("observedGeneration %d < desired %d", newDeployment.Status.ObservedGeneration, targetGen)
}
g.Expect(newDeployment.Status.ObservedGeneration).To(BeNumerically(">=", targetGen)) g.Expect(newDeployment.Status.ObservedGeneration).To(BeNumerically(">=", targetGen))
desired := int32(1) desired := int32(1)