mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-10-22 06:13:00 +00:00
Fix build: t.Context() needs Go 1.24, this branch pins Go 1.23
release-1.16's go.mod pins go 1.23.0/1.23.11. t.Context() was added in Go 1.24, so the backported test failed to even compile (breaking both Run CI and Run Linter Check identically, since golangci-lint's typecheck pass hits the same compile error). Use context.TODO(), matching every other Reconcile() call in this test file. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
This commit is contained in:
@@ -460,7 +460,7 @@ func TestBackupDeletionControllerReconcile(t *testing.T) {
|
||||
td.backupStore.On("GetBackupContents", input.Spec.BackupName).Return(io.NopCloser(bytes.NewReader([]byte("hello world"))), nil)
|
||||
td.backupStore.On("DeleteBackup", input.Spec.BackupName).Return(nil)
|
||||
|
||||
_, err := td.controller.Reconcile(t.Context(), td.req)
|
||||
_, err := td.controller.Reconcile(context.TODO(), td.req)
|
||||
require.NoError(t, err)
|
||||
|
||||
td.backupStore.AssertCalled(t, "DeleteBackup", input.Spec.BackupName)
|
||||
|
||||
Reference in New Issue
Block a user