diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 09:09:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 09:09:06 +0000 |
commit | 9450a63064cd1572f030628dbf155f5c047f28c7 (patch) | |
tree | 62c938f6ceb8dd16f3af49cd86312c52bf6538fe /doc/development/testing_guide | |
parent | 4a69e105ab22c23edcdabb37fbdaf2554b088a6d (diff) | |
download | gitlab-ce-9450a63064cd1572f030628dbf155f5c047f28c7.tar.gz |
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 2af9d12a251..3a2b40a6cd5 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -472,6 +472,10 @@ You can use `if: Gitlab.ee?` or `unless: Gitlab.ee?` on context/spec blocks to e Example: [SchemaValidator reads a different path depending on the license](https://gitlab.com/gitlab-org/gitlab/-/blob/7cdcf9819cfa02c701d6fa9f18c1e7a8972884ed/spec/lib/gitlab/ci/parsers/security/validators/schema_validator_spec.rb#L571) +### Tests depending on SaaS + +You can use the `:saas` RSpec metadata tag helper on context/spec blocks to test code that only runs on GitLab.com. This helper sets `Gitlab.config.gitlab['url']` to `Gitlab::Saas.com_url`. + ### Coverage [`simplecov`](https://github.com/colszowka/simplecov) is used to generate code test coverage reports. |