From 77c74ea04a1e32114959475c7fdac0da28cf6332 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Fri, 27 Nov 2026 05:15:26 +0100 Subject: [PATCH] test(backups): register the RestoreJob status subresource in the fake client The restore tests on this line build their fake client without a status subresource for RestoreJob, so a reconcile that fails the job through Status().Update gets NotFound instead of a Failed phase. The cross-tenant checks backported here are the first tests on this line to take that path; main already registers it. Assisted-by: LLM Signed-off-by: Andrei Kvapil --- internal/backupcontroller/velerostrategy_controller_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/backupcontroller/velerostrategy_controller_test.go b/internal/backupcontroller/velerostrategy_controller_test.go index 6894815b7..11cde37b7 100644 --- a/internal/backupcontroller/velerostrategy_controller_test.go +++ b/internal/backupcontroller/velerostrategy_controller_test.go @@ -355,6 +355,7 @@ func newTestRestoreJobReconcilerWithDynamic(t *testing.T, dynamicObjects []runti fakeClient := clientfake.NewClientBuilder(). WithScheme(testScheme). WithObjects(objects...). + WithStatusSubresource(&backupsv1alpha1.RestoreJob{}). Build() dynamicClient := dynamicfake.NewSimpleDynamicClient(testScheme, dynamicObjects...)