You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently openebsctl project has a K8sClient, which encapsulates all required typed clients for reaching the k8s-apis. Due to the nature of the codebase & huge options, this project sometimes needs a slice of objects and sometimes it needs a the objects mapped to some key. It is the mapping part of the codebase which is repetitive, this can be avoided by casting it to some generic values in such a way that the code outside pkg/client doesn't need modification & no interfaces{} or runtime.Object or metav1.Unstructured are used outside the client package & possible panics() are taken care by strong UTs.
Methods with a single line do not need unit test coverage
But methods with mapping logic or some other business logic needs to be tested
The text was updated successfully, but these errors were encountered:
Currently openebsctl project has a
K8sClient
, which encapsulates all required typed clients for reaching the k8s-apis. Due to the nature of the codebase & huge options, this project sometimes needs a slice of objects and sometimes it needs a the objects mapped to some key. It is the mapping part of the codebase which is repetitive, this can be avoided by casting it to some generic values in such a way that the code outsidepkg/client
doesn't need modification & nointerfaces{}
orruntime.Object
ormetav1.Unstructured
are used outside the client package & possiblepanics()
are taken care by strong UTs.The text was updated successfully, but these errors were encountered: