-
Notifications
You must be signed in to change notification settings - Fork 189
doc: Updates contributing file with code and test best practices #1666
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on my side - kindly wait for other team's feedback as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, small detail
|
||
- Each resource (and associated data sources) is in a package in `internal/service`. | ||
- There can be multiple helper classes and they can also be used from other resources, e.g. `common_advanced_cluster.go` defines functions that are also used from other resources using `advancedcluster.FunctionName`. | ||
- Unit and Acceptances tests are in the same `_test.go` file. They are not in the same package as the code tests, e.g. `advancedcluster` tests are in `advancedcluster_test` package so coupling is minimized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format for brevity consider adding chapters:
- Unit and Acceptances tests are in the same `_test.go` file. They are not in the same package as the code tests, e.g. `advancedcluster` tests are in `advancedcluster_test` package so coupling is minimized. | |
## Code Changes | |
... | |
## Unit and Acceptance tests |
Contributing is usually focused on guiding new person to do specific tasks.
Instead of
- Unit and Acceptances tests are in the same
_test.go
file. They are not in the same package as the code tests, e.g.advancedcluster
tests are inadvancedcluster_test
package so coupling is minimized.
Consider:
Create *_test.go file for both Unit and Acceptance tests.
For example see: link.
Consider reader empathy:
package so coupling is minimized.
do we need that info for the new contributions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those aren't blocking PR. Just some nits and CONTRIBUTING.md format tips for future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Andrea Angiolillo <[email protected]>
Co-authored-by: Andrea Angiolillo <[email protected]>
Co-authored-by: Agustin Bettati <[email protected]>
|
Description
Jira ticket: INTMDB-1346
Updates contributing file with code and test best practices.
Type of change:
Required Checklist:
Further comments