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 <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil committed 2026-11-27 05:15:26 +01:00
1 parent ed1b86fda5
commit 77c74ea04a
1 file changed
+1
@@ -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...)