Skip to content

Commit 79a6e43

Browse files
committed
fix tests
1 parent f52f597 commit 79a6e43

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

internal/controller/selector_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ var _ = Describe("Target Selection and Safety Filters", func() {
8585
})
8686
})
8787

88-
Context("non-running pods are excluded", func() {
89-
It("skips Pending and Succeeded pods", func() {
88+
Context("non-running pods are included", func() {
89+
It("includes Pending and Succeeded pods in the eligible pool", func() {
9090
labels := map[string]string{"role": "phase-test"}
9191
running := makePod("phase-running", ns, labels, corev1.PodRunning)
9292
pending := makePod("phase-pending", ns, labels, corev1.PodPending)
@@ -107,7 +107,9 @@ var _ = Describe("Target Selection and Safety Filters", func() {
107107
r := newReconciler()
108108
targets, err := r.selectTargets(ctx, exp)
109109
Expect(err).NotTo(HaveOccurred())
110-
Expect(targets).To(ConsistOf("phase-running"))
110+
// All non-terminating pods are eligible regardless of phase so that
111+
// percentage calculations reflect the true fleet size.
112+
Expect(targets).To(ConsistOf("phase-running", "phase-pending", "phase-succeeded"))
111113
})
112114
})
113115

0 commit comments

Comments
 (0)