mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-30 03:36:12 +00:00
Delete Requeue from ctrl.Result, because Requeue is deprecated by controller-runtime.
The change is used to address the linter issue after golangci-lint bump to v2.13.1. Requeue is replaced by RequeueAfter. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -790,7 +790,7 @@ func TestPodVolumeRestoreReconcile(t *testing.T) {
|
||||
targetPod: builder.ForPod("test-ns", "test-pod").InitContainers(&corev1api.Container{Name: restorehelper.WaitInitContainer}).InitContainerState(corev1api.ContainerState{Running: &corev1api.ContainerStateRunning{}}).Result(),
|
||||
constrained: true,
|
||||
expected: builder.ForPodVolumeRestore(velerov1api.DefaultNamespace, pvrName).Finalizers([]string{PodVolumeFinalizer}).Result(),
|
||||
expectedResult: &ctrl.Result{Requeue: true, RequeueAfter: time.Second * 5},
|
||||
expectedResult: &ctrl.Result{RequeueAfter: time.Second * 5},
|
||||
},
|
||||
{
|
||||
name: "new pvr but accept failed",
|
||||
@@ -858,7 +858,7 @@ func TestPodVolumeRestoreReconcile(t *testing.T) {
|
||||
dataMgr: datapath.NewManager(0),
|
||||
notNilExpose: true,
|
||||
notMockCleanUp: true,
|
||||
expectedResult: &ctrl.Result{Requeue: true, RequeueAfter: time.Second * 5},
|
||||
expectedResult: &ctrl.Result{RequeueAfter: time.Second * 5},
|
||||
},
|
||||
{
|
||||
name: "data path init error",
|
||||
@@ -1057,7 +1057,6 @@ func TestPodVolumeRestoreReconcile(t *testing.T) {
|
||||
}
|
||||
|
||||
if test.expectedResult != nil {
|
||||
assert.Equal(t, test.expectedResult.Requeue, actualResult.Requeue)
|
||||
assert.Equal(t, test.expectedResult.RequeueAfter, actualResult.RequeueAfter)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user