New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mock handling for implicit generic support #3960
Comments
Based upon #3941 (reply in thread) a quick implementation would be something like KubernetesMockServer.defineType(ResourceDefinitionContext) - and it would automatically setup the needed expectations. Based upon #3941 (reply in thread) you could also consider a more crud based approach to the api resources. Or there is existing CRD aware logic in the mock server - that is already inferring the plurals so we could actually extend this to return the full api endpoint metadata as well. This is also making me think we should just remove the proposed EnableKubernetesMockClient.unsupported - and instead let that be driven off of methods on the KubernetesMockClient. |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
I've missed this issue. Last month I spent some time refactoring the Mock Server CRUD mode and I was thinking that we were missing something related to what's requested here. Please check the following list of properties for the CRUD mode to see if we're aligned and can we establish some sort of spec to implement the missing features:
|
|
Is your task related to a problem? Please describe
When using the built-in mock server the metadata will be missing for a generic resource.
Describe the solution you'd like
There should be a way either against the client or the mock server to register a ResourceDefinitionContext for testing purposes.
Currently when you use the entry point client.genericKubernetesResources(context) - that context is not cached / saved, it is only used locally for that operation.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: