dont return not found error in mode 2 (#100758)

* dual writer: dont return not found error in mode 2 when failing to find object in unistore
This commit is contained in:
Will Assis
2025-02-14 20:39:51 +02:00
committed by GitHub
parent cd30f3839d
commit 77fd572973
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ func (d *DualWriterMode2) Get(ctx context.Context, name string, options *metav1.
}
}()
return objLegacy, err
return objLegacy, nil
}
// List overrides the behavior of the generic DualWriter.
@@ -122,7 +122,6 @@ func TestMode2_Get(t *testing.T) {
m.On("Get", mock.Anything, input, mock.Anything).Return(nil, apierrors.NewNotFound(
schema.GroupResource{Group: "", Resource: "pods"}, "not-found"))
},
wantErr: true,
},
{
name: "should return an error when getting an object from both the LegacyStorage and Storage fails",