-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Panic in fake client #168
Comments
/kind bug I think this is just straight-up a bug. I seem to recall discussion a solution at some point, but can't recall what it was. |
Is anybody looking into this bug? :) |
Any intent to fix? |
I don't think anyone's working on it right now. If you want to, please let me know. Like most bugs, we do intend to fix it eventually -- we're just all fairly busy :-) /priority important-longterm |
* update generated code via bin/gen-kube This should help with * kubernetes-sigs/controller-runtime#168 * kubernetes-sigs/controller-runtime#213
* `go get -u ...@version` * `go mod tidy` * update generated code via bin/gen-kube This should help with * kubernetes-sigs/controller-runtime#168 * kubernetes-sigs/controller-runtime#213
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
closing as per above comment |
* `go get -u ...@version` * `go mod tidy` * update generated code via bin/gen-kube This should help with * kubernetes-sigs/controller-runtime#168 * kubernetes-sigs/controller-runtime#213
* `go get -u ...@version` * `go mod tidy` * update generated code via bin/gen-kube This should help with * kubernetes-sigs/controller-runtime#168 * kubernetes-sigs/controller-runtime#213
I tried to write unit tests using the fake client and
List()
panics reliably when accessingopts.Raw
:controller-runtime/pkg/client/fake/client.go
Lines 80 to 82 in ddf0390
Why
opts.Raw
must be filled (it's not necessary when using the real client) and why it'sTypeMeta
should have any value?If I understand the code (and I probably don't), it expects
opts.Raw.TypeMeta.GroupVersionKind()
to be the kind of items in returned list, not the list itself (i.e. Pod instead of PodList). Such requirement looks very odd.The text was updated successfully, but these errors were encountered: