-
Couldn't load subscription status.
- Fork 1.2k
Closed
Description
If I have an UnstructuredList with a known GVK, passing it to fakeClient.List returns an error:
item[0]: can't assign or convert unstructured.Unstructured into <myGV>.<myKind> Running in the debugger revealed that fakeClient.List passes the underlying type to client-go, which returns a list of the underlying type. So it makes sense that fake client would error when trying to populate the UnstructuredList with objects it gets from client-go.
There should be some way for fakeClient.List to handle Unstructured* objects. IIUC the real client delegates to an unstructured client. That seems heavy-handed here, but it may be the only way to avoid a bunch of spaghetti in fakeClient.List just to handle UnstructuredList as a special case.
This is related to #702 but is not the same issue.
Metadata
Metadata
Assignees
Labels
No labels