Closed simonvane closed 3 years ago
I would be open to adding an IKubernetesExtensions interface that extends IKubernetes.
Thanks @brendanburns and sorry for the delayed response.
That would help me but it would mean that consumers would need to inject two dependencies if they want to use methods from both IKubernetes
and IKubernetesExtensions
. There seems to be an artificial distinction there.
IKubernetes
instead?Thanks.
Both IKubernetes and IKubernetesExtensions are generated so its tricky to make modifications. (if you can figure out a way to make it work without changing those two interface's .cs files than it's prob. ok.
Would be great to have some helper methods to faciliate mocking. Running into NREs in an extension method is not a nice experience.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-contributor-experience at kubernetes/community. /close
@fejta-bot: Closing this issue.
I am using
CreateNamespacedCustomObjectAsync
(which works really well thanks) and other similar methods that are ink8s.KubernetesExtensions
rather than thek8s.IKubernetes
.The problem that is giving me is that I can't use mocking frameworks to mock extension methods in my unit tests. This means I have to look at the source to see what the implementation is for the extension methods then mock the internal calls.
It would be a lot easier for me to test if those methods were on the
IKubernetes
interface.