-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Makefile should not need to be modified to get tests to run #3692
Comments
make test
working after scaffolding a new project
haha, I just hit this same error! The docs are misleading to me, the part about 'setting up your test environment' is something I skipped because I really just wanted to build my operator not test it, however, that test step actually provides the missing dependencies required to do a build. |
It will be solved when we are able to merge; kubernetes-sigs/kubebuilder#1626 and support the go/v3-alpha plugin from kubebuilder. Needs to be post 1.0. |
Yes, I don't understand the situation here. |
There are 3 possible solutions:
|
Consensus on the grooming call was to do option 2. |
It is great news @jmrodri. Also, I think the best option is 2. |
@camilamacedo86 Doesn't your comment indicate we get this for free because it's been fixed upstream? We just need to bump the version? |
waiting for 1711 in kubebuilder to be merged before we bump our dependency on it |
We're going to merge #3983 and wait on the upstream changes to fix it for good. |
I'd like to keep this issue open to track the issue upstream. Will move it into the next release and take off the blocker tag. |
It was |
In SDK, this problem is solved with the PR #3983 and it was cherry-picked to v1.0.x with #4038. Also, the same solution is merged already for the v3+ plugins in upstream and a better approach has been discussed and might be pushed to v2+ as well. More info: kubernetes-sigs/kubebuilder#1711. In this way, we can consider it solved. |
Bug Report
A user should not have to update their
Makefile
after scaffolding an operator to getmake test
to work.What did you do?
What did you expect to see?
I expected
make test
to run the tests and if it needs other binaries to install them.What did you see instead? Under which circumstances?
After running
make test
it spewed tons of errors:Environment
Go
Possible Solution
If the
test
target requires the user to modify it to work, why can't the scaffolder generate aMakefile
with the propertest
target as outlined below.Additional context
This issue apparently was brought up in Issue #3461 because kubebuilder executables are required for the tests. They are still not in the Prerequisites: Golang Based Operator SDK Installation. The solution suggested in the documentation, is for the user to modify the newly scaffolded
Makefile
with the following:The text was updated successfully, but these errors were encountered: