You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coding guidelines: document use of internal/testutil module (#14219)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR adds a coding guideline about when to use the
`internal/testutil` module.
Copy file name to clipboardExpand all lines: docs/coding-guidelines.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,9 @@ We use the following rules for some common situations where we split into separa
68
68
it is part of the `config` folder, and `extensionauth` has `extension` as a prefix since it is
69
69
part of the `extension` module.
70
70
1. Testing helpers should be in a separate submodule with the suffix `test`. For example, if you
71
-
have a module `component`, the helpers should be in `component/componenttest`.
71
+
have a module `component`, the helpers should be in `component/componenttest`. Testing helpers
72
+
that are used across multiple modules should be in the [`internal/testutil`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/internal/testutil)
73
+
module.
72
74
1. Experimental packages that will later be added to another module should be in their own module,
73
75
named as they will be after integration. For example, if adding a `pprofile` package to `pdata`,
74
76
you should add a separate module `pdata/pprofile` for the experimental code.
0 commit comments