diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 00:09:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 00:09:02 +0300 |
commit | 76623c12c136f43f24c3966ed4b469e2c0b434b7 (patch) | |
tree | 7c5ec884c25e03e4fea131a4d112a9d0ccfd59b8 /doc/development/testing_guide | |
parent | b042382bbf5a4977c5b5c6b0a9a33f4e8ca8d16d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/testing_guide')
-rw-r--r-- | doc/development/testing_guide/best_practices.md | 12 | ||||
-rw-r--r-- | doc/development/testing_guide/flaky_tests.md | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 58e802a9d27..78fbd421b4d 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -38,13 +38,13 @@ To run rspec tests: ```shell # run all tests -bundle exec rspec +bin/rspec # run test for path -bundle exec rspec spec/[path]/[to]/[spec].rb +bin/rspec spec/[path]/[to]/[spec].rb ``` -Use [guard](https://github.com/guard/guard) to continuously monitor for changes and only run matching tests: +Use [Guard](https://github.com/guard/guard) to continuously monitor for changes and only run matching tests: ```shell bundle exec guard @@ -130,7 +130,7 @@ Note: `live_debug` only works on JavaScript enabled specs. Run the spec with `CHROME_HEADLESS=0`, e.g.: ``` -CHROME_HEADLESS=0 bundle exec rspec some_spec.rb +CHROME_HEADLESS=0 bin/rspec some_spec.rb ``` The test will go by quickly, but this will give you an idea of what's happening. @@ -382,8 +382,8 @@ this trait should be either fixed to not rely on Sidekiq processing jobs, or the the processing of background jobs is needed/expected. NOTE: **Note:** -The usage of `perform_enqueued_jobs` is currently useless since our -workers aren't inheriting from `ApplicationJob` / `ActiveJob::Base`. +The usage of `perform_enqueued_jobs` is only useful for testing delayed mail +deliveries since our Sidekiq workers aren't inheriting from `ApplicationJob` / `ActiveJob::Base`. #### DNS diff --git a/doc/development/testing_guide/flaky_tests.md b/doc/development/testing_guide/flaky_tests.md index 94c45f5d2f7..5015c613557 100644 --- a/doc/development/testing_guide/flaky_tests.md +++ b/doc/development/testing_guide/flaky_tests.md @@ -50,6 +50,9 @@ is detected in any other branch (`flaky-examples-check` job). In the future, the This was originally implemented in: <https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/13021>. +If you want to enable retries locally, you can use the `RETRIES` env variable. +For instance `RETRIES=1 bin/rspec ...` would retry the failing examples once. + [rspec-retry]: https://github.com/NoRedInk/rspec-retry [`spec/spec_helper.rb`]: https://gitlab.com/gitlab-org/gitlab/blob/master/spec/spec_helper.rb |