-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
cannot specify ControlPlane in envtest.Environment #875
Comments
This just needs a release. It was fixed in #846. |
@rajathagasthya no, this issue is different; #846 doesn't fix it. We explicitly want to specify things like the apiserver host/port and etcd host/port. We had been doing something like env := &envtest.Environment {
ControlPlane: &integration.ControlPlane{
APIServer: &integration.APIServer{
URL: apiserverURL,
EtcdURL: etcdURL,
},
Etcd: &integration.Etcd{
URL: etcdURL,
},
},
} etc. We can no longer do that, since |
Or for another example, we can't do something like this anymore: controller-runtime/pkg/internal/testing/integration/internal/integration_tests/integration_test.go Lines 107 to 114 in 8975354
|
Ah, sorry. I conflated this with the apiserver flags breakage. I don't think integration testing package should be in an internal package since many things there are customizable in an envtest environment. There are multiple breakages to envtest when testing framework was brought into controller-runtime and put into internal package. |
cc @hoegaarden Was this intentionally put under |
agreed here -- those types shouldn't be internal. Sorry about that. I think all the shuffling around got things lost in translation. |
FWIW, I think the intention was that some of the internal helpers were supposed to be in internal, while the public types stayed exposed externally. The goal was to eventually unify our |
/good-first-issue should be an easy fix -- just re-export these types. |
@DirectXMan12: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/priority critical-urgent |
/assign |
I think this issue is similar to #841.
We have some code using
envtest.Environment
that has used theControlPlane
field to specify arguments for theAPIServer
andEtcd
components:After
sigs.k8s.io/testing_frameworks/integration
was moved intopkg/internal/testing/integration
in #714, we can no longer do this:Is there a better way to be achieving this? Or was this unintentional?
The text was updated successfully, but these errors were encountered: