Skip to content

Commit

Permalink
address minor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvindthiru committed Dec 25, 2024
1 parent 21b20a8 commit dd74157
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions pkg/controllers/rollout/controller_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@ var _ = Describe("Test the rollout Controller", func() {
It("Should rollout all the selected bindings when the rollout strategy is not set", func() {
// create CRP
var targetCluster int32 = 11
// rolloutStrategy not set.
rolloutCRP = clusterResourcePlacementForTest(testCRPName,
createPlacementPolicyForTest(fleetv1beta1.PickNPlacementType, targetCluster),
createPlacementRolloutStrategyForTest(fleetv1beta1.RollingUpdateRolloutStrategyType, generateDefaultRollingUpdateConfig(), nil))
// remove the strategy
rolloutCRP.Spec.Strategy = fleetv1beta1.RolloutStrategy{}
fleetv1beta1.RolloutStrategy{})
Expect(k8sClient.Create(ctx, rolloutCRP)).Should(Succeed())
// create master resource snapshot that is latest
masterSnapshot := generateResourceSnapshot(rolloutCRP.Name, 0, true)
Expand Down
6 changes: 3 additions & 3 deletions pkg/controllers/rollout/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ func TestPickBindingsToRoll(t *testing.T) {
wantNeedRoll: true,
wantWaitTime: 25 * time.Second, // minWaitTime = (t - 35 seconds) - (t - 60 seconds) = 25 seconds
},
"test bound deleting binding - rollout blocked": {
"test only one bound but is deleting binding - rollout blocked": {
allBindings: []*fleetv1beta1.ClusterResourceBinding{
setDeletionTimeStampForBinding(generateClusterResourceBinding(fleetv1beta1.BindingStateBound, "snapshot-1", cluster1)),
},
Expand Down Expand Up @@ -1703,8 +1703,8 @@ func TestPickBindingsToRoll(t *testing.T) {
},
"test upscale with policy change MaxSurge specified, evict resources from canBeReady bound binding - rollout allowed for three new scheduled bindings": {
allBindings: []*fleetv1beta1.ClusterResourceBinding{
setDeletionTimeStampForBinding(generateCanBeReadyClusterResourceBinding(fleetv1beta1.BindingStateBound, "snapshot-1", cluster1)),
generateCanBeReadyClusterResourceBinding(fleetv1beta1.BindingStateBound, "snapshot-1", cluster2),
setDeletionTimeStampForBinding(generateCanBeReadyClusterResourceBinding(fleetv1beta1.BindingStateUnscheduled, "snapshot-1", cluster1)),
generateCanBeReadyClusterResourceBinding(fleetv1beta1.BindingStateUnscheduled, "snapshot-1", cluster2),
generateClusterResourceBinding(fleetv1beta1.BindingStateScheduled, "snapshot-1", cluster3),
generateClusterResourceBinding(fleetv1beta1.BindingStateScheduled, "snapshot-1", cluster4),
generateClusterResourceBinding(fleetv1beta1.BindingStateScheduled, "snapshot-1", cluster5),
Expand Down

0 comments on commit dd74157

Please sign in to comment.