diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-11-17 14:39:30 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-11-17 14:39:30 +0300 |
commit | 11231dccdc47b84c807078bb5bb9e4a5d744f02f (patch) | |
tree | 3737fa1c355cde7423fd0cec89ee98b51c6b55b1 /STYLE.md | |
parent | 1af14a2777cab1ef7342f44cc61408d21d61f373 (diff) |
style: Document location of `TestMain()` function
While many tests use a `testhelper_test.go` file to implement
`TestMain()`, this is not common to all. This makes test setup harder to
find than necessary. This commit thus documents the recommended name of
"testhelper_test.go" for such code.
Diffstat (limited to 'STYLE.md')
-rw-r--r-- | STYLE.md | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -247,6 +247,11 @@ practices](https://prometheus.io/docs/practices/naming/) and be aware of the [gotchas](https://prometheus.io/docs/practices/instrumentation/#things-to-watch-out-for). +### Main function + +If tests require a `TestMain()` function for common setup, this function should +be implemented in a file called `testhelper_test.go` + ## Git Commands Gitaly relies heavily on spawning git subprocesses to perform work. Any git |