summaryrefslogtreecommitdiff
path: root/doc/development/testing_guide/end_to_end/feature_flags.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/testing_guide/end_to_end/feature_flags.md')
-rw-r--r--doc/development/testing_guide/end_to_end/feature_flags.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/development/testing_guide/end_to_end/feature_flags.md b/doc/development/testing_guide/end_to_end/feature_flags.md
index bf1e70be9cb..3bd07f17207 100644
--- a/doc/development/testing_guide/end_to_end/feature_flags.md
+++ b/doc/development/testing_guide/end_to_end/feature_flags.md
@@ -1,11 +1,13 @@
# Testing with feature flags
-To run a specific test with a feature flag enabled you can use the `QA::Runtime::Feature` class to enabled and disable feature flags ([via the API](../../../api/features.md)).
+To run a specific test with a feature flag enabled you can use the `QA::Runtime::Feature` class to enable and disable feature flags ([via the API](../../../api/features.md)).
Note that administrator authorization is required to change feature flags. `QA::Runtime::Feature` will automatically authenticate as an administrator as long as you provide an appropriate access token via `GITLAB_QA_ADMIN_ACCESS_TOKEN` (recommended), or provide `GITLAB_ADMIN_USERNAME` and `GITLAB_ADMIN_PASSWORD`.
+Please be sure to include the tag `:requires_admin` so that the test can be skipped in environments where admin access is not available.
+
```ruby
-context "with feature flag enabled" do
+context "with feature flag enabled", :requires_admin do
before do
Runtime::Feature.enable('feature_flag_name')
end