From 88b8c6f1ae15971bf3dcd38dc61d0a5c8efcacdf Mon Sep 17 00:00:00 2001 From: Arvind Thirumurugan Date: Thu, 26 Dec 2024 15:06:25 -0800 Subject: [PATCH] minor changes --- pkg/controllers/rollout/controller_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controllers/rollout/controller_test.go b/pkg/controllers/rollout/controller_test.go index b3dca1b18..b5c9d7dfd 100644 --- a/pkg/controllers/rollout/controller_test.go +++ b/pkg/controllers/rollout/controller_test.go @@ -1733,8 +1733,8 @@ func TestPickBindingsToRoll(t *testing.T) { ResourceSnapshotName: "snapshot-1", }, }, - wantTobeUpdatedBindings: []int{2, 3, 4}, // specified MaxSurge helps us pick three new scheduled bindings out of four, target number + MaxSurge is greater than canBeReady bindings. - wantStaleUnselectedBindings: []int{5}, // unscheduled binding is a canBeReady binding & maxUnavailable is set to zero. + wantTobeUpdatedBindings: []int{2, 3, 4}, // specified MaxSurge helps us pick three new scheduled bindings out of four, target number + MaxSurge is greater than canBeReady bindings, unscheduled binding is a canBeReady binding & maxUnavailable is set to zero. + wantStaleUnselectedBindings: []int{5}, wantNeedRoll: true, wantWaitTime: time.Second, }, @@ -1885,8 +1885,8 @@ func TestPickBindingsToRoll(t *testing.T) { ResourceSnapshotName: "snapshot-1", }, }, - wantTobeUpdatedBindings: []int{1}, // more ready bindings than required we remove one unscheduled binding, since two bindings are already canBeReady we don't roll out new scheduled bindings. - wantStaleUnselectedBindings: []int{4, 5}, // more canBeReady bindings than target number + maxSurge so scheduled bindings are not rolled out. + wantTobeUpdatedBindings: []int{1}, // more ready bindings than required we remove one unscheduled binding + wantStaleUnselectedBindings: []int{4, 5}, // since three unscheduled bindings are already canBeReady we don't roll out new scheduled bindings. wantNeedRoll: true, wantWaitTime: 0, },