Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-11-17 14:39:30 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-11-17 14:39:30 +0300
commit11231dccdc47b84c807078bb5bb9e4a5d744f02f (patch)
tree3737fa1c355cde7423fd0cec89ee98b51c6b55b1 /STYLE.md
parent1af14a2777cab1ef7342f44cc61408d21d61f373 (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.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/STYLE.md b/STYLE.md
index 8230c8f9d..2461867a0 100644
--- a/STYLE.md
+++ b/STYLE.md
@@ -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