Skip to content
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

Improvements in suite_test.go files generated by kubebuilder (v3+ only) #1733

Closed
prafull01 opened this issue Oct 21, 2020 · 3 comments · Fixed by #1760
Closed

Improvements in suite_test.go files generated by kubebuilder (v3+ only) #1733

prafull01 opened this issue Oct 21, 2020 · 3 comments · Fixed by #1760
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@prafull01
Copy link
Contributor

prafull01 commented Oct 21, 2020

From the discussion happened on the 1710 [comment] ,the following improvements should happen on the suite_test.go files generated by kubebuilder:

  1. Instead of mutating same error every time, use the form foo, err := Func()
  2. Remove Done from the BeforeSuite as we are not running the BeforeSuite asynchronously.

/kind feature

@prafull01 prafull01 added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 21, 2020
@camilamacedo86
Copy link
Member

Just to register, these suggestions came from the community and were made in the review of #1710 (https://github.com/kubernetes-sigs/kubebuilder/pull/1710/files#r508884888 and https://github.com/kubernetes-sigs/kubebuilder/pull/1710/files#r508885222 ).

So, shows that make more sense to address the suggestions in a follow up of #1710 in both suite_test.go files. (for webhooks controllers) and only for v3+.

@prafull01 prafull01 changed the title Improvements in suite_test.go files generated by kubebuilder Improvements in suite_test.go files generated by kubebuilder (v3+ only) Oct 21, 2020
@prafull01
Copy link
Contributor Author

/assign

@ndipebot
Copy link

  • +1 for switching to foo, err := Func() in scaffolding for both controller and webhook.

  • Tested eliminating Done from BeforeSuite in my controller and webhook integration tests and everything runs smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants