diff options
| author | Stan Hu <stanhu@gmail.com> | 2018-05-08 22:29:30 -0700 |
|---|---|---|
| committer | Stan Hu <stanhu@gmail.com> | 2018-05-09 14:33:42 -0700 |
| commit | 204af2e1019e661fddc451ad0cfb982453d4085b (patch) | |
| tree | 3b6484d2eba16771b96a41f8f2e994678f278ecb /doc | |
| parent | 5b0e96d09a7b6309384ef4c300c56872adba0626 (diff) | |
| download | gitlab-ce-204af2e1019e661fddc451ad0cfb982453d4085b.tar.gz | |
Support resetting of Prometheus metrics between test runs
Adding the :prometheus tag to an rspec test will clear out
memory-mapped files and reset the registry.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/39968
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/development/testing_guide/best_practices.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 7b32e0a47e1..61fa5459b91 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -230,6 +230,11 @@ describe "#==" do end ``` +### Prometheus tests + +Prometheus metrics may be preserved from one test run to another. To ensure that metrics are +reset before each example, add the `:prometheus` tag to the Rspec test. + ### Matchers Custom matchers should be created to clarify the intent and/or hide the |
