mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
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:
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...)
|
||||
|
||||
Reference in new issue
Block a user