- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for nowFn (0.03 sec)
-
pkg/controller/deployment/progress_test.go
Name: "doesnt_matter", }, ), } dc.enqueueDeployment = dc.enqueue for _, test := range tests { t.Run(test.name, func(t *testing.T) { if test.nowFn != nil { nowFn = test.nowFn } _, ctx := ktesting.NewTestContext(t) ctx, cancel := context.WithCancel(ctx) defer cancel() got := dc.requeueStuckDeployment(ctx, test.d, test.status) if got != test.expected {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 13.3K bytes - Viewed (0) -
pkg/controller/deployment/util/deployment_util_test.go
}, } } tests := []struct { name string d apps.Deployment nowFn func() time.Time expected bool }{ { name: "nil progressDeadlineSeconds specified - no timeout", d: deployment(apps.DeploymentProgressing, v1.ConditionTrue, "", null, timeFn(1, 9)), nowFn: func() time.Time { return timeFn(1, 20) }, expected: false, }, {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 08 09:10:50 UTC 2023 - 37.1K bytes - Viewed (0) -
pkg/controller/deployment/progress.go
continue } conditions = append(conditions, util.ReplicaSetToDeploymentCondition(c)) } } return conditions } // used for unit testing var nowFn = func() time.Time { return time.Now() } // requeueStuckDeployment checks whether the provided deployment needs to be synced for a progress
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 13 11:00:44 UTC 2023 - 8.9K bytes - Viewed (0) -
pkg/controller/deployment/util/deployment_util.go
(newStatusOldReplicas < oldStatusOldReplicas) || newStatus.ReadyReplicas > deployment.Status.ReadyReplicas || newStatus.AvailableReplicas > deployment.Status.AvailableReplicas } // used for unit testing var nowFn = func() time.Time { return time.Now() } // DeploymentTimedOut considers a deployment to have timed out once its condition that reports progress
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 07:09:11 UTC 2023 - 39.3K bytes - Viewed (0)