Skip to content

Commit 4f06928

Browse files
committed
use setStatus() instead of set()
there was an update [0] to the controller-runtime fake client to zero out all fields when serializing a target this was causing the UpdatedReplicas value to be overwritten with 0 and causing the UT to fail. the test case portion affected by this was only interested in Status changes so updating to use setStatus() should make sense here. [0] kubernetes-sigs/controller-runtime@e368149 Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
1 parent 48ee7cc commit 4f06928

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/statusmanager/status_manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ func TestStatusManagerSetFromDeployments(t *testing.T) {
12801280
depB.Status.UpdatedReplicas = depB.Status.Replicas
12811281
depB.Status.UnavailableReplicas = 0
12821282
depB.Status.AvailableReplicas = depB.Status.Replicas
1283-
set(t, client, depB)
1283+
setStatus(t, client, depB)
12841284
status.SetFromPods()
12851285

12861286
co, oc, err = getStatuses(client, "testing")

0 commit comments

Comments
 (0)