-
Notifications
You must be signed in to change notification settings - Fork 48
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
enable use of existing cluster in envtest #64
Conversation
so this is currently uncondtionally using an exsiting cluster |
Yeah, I would like to keep the possibility to run the envtest locally without CRC. With this patch I got the following error if I run
For me either a separate make target or some conditional env variable is OK to be used to make the test work in both cases. |
this change modifies envtest to use an existing cluster dynamicly if USE_EXISTING_CLUSTER is defiend in the current env. To do this when running under vscod this to settings.json { "go.testEnvVars": { "USE_EXISTING_CLUSTER": "true", } }
f87ef5a
to
7286c42
Compare
we dont need this at all for viscose we just need to set in settings.json if i set it to false on my host the test fail becuase im missing binaires in my normal path that envtest needs but if i set it to true they work so i might just abandon this. what do you think? i realised this probaly was not needed after i implemented looking it up form the env but envtest already supprot that so all that was/is missing is ensuring that its set in the env in vscode and or when you run make im not sure if make normally passes all env vars or if we need to plumb those through manually but ill probably just run these from vscode so i can use the debugger to step line by line if needed anyway so settings.json works for me. |
So I assume |
make test just works for me and i have no idea why [stack@crc nova-operator]$ make test [stack@crc nova-operator] i assume that while the binary ar enot on my path for go test to work Ran 0 of 0 Specs in 0.013 seconds You're using deprecated Ginkgo functionality:Ginkgo 2.0 is under active development and will introduce several new features, improvements, and a small handful of breaking changes.
You are using a custom reporter. Support for custom reporters will likely be removed in V2. Most users were using them to generate junit or teamcity reports and this functionality will be merged into the core reporter. In addition, Ginkgo 2.0 will support emitting a JSON-formatted report that users can then manipulate to generate custom reports. If this change will be impactful to you please leave a comment on onsi/ginkgo#711 To silence deprecations that can be silenced set the following environment variable: --- FAIL: TestAPIs (0.01s) the fact make test is adding KUBEBUILDER_ASSETS=/home/stack/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64 which contains the required deps is why that works [stack@crc nova-operator]$ ls ~/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64/ that is not using CRC but if i tell it to use the existing env it might |
There is |
this change modifies envtest to use an existing cluster.