Capability to turn on and off a feature flag in QA Framework
When we write E2E tests for a feature which is behind a feature flag :
- As of today, the tests cannot be merged until the feature flag is fully turned on in master (by default) or until the feature flag is removed from the master.
As a first step, we need to have a function/class in QA framework which does the following:
- Check whether a given feature flag is present.
- If present and if it is turned OFF by default - Turn it ON, run the test and then turn it OFF.
We can use the Feature Flags API to do so - https://docs.gitlab.com/ee/api/features.html
There are 2 scenarios to implement:
-
Toggle a feature flag and then run all tests (this is how it works with the Gitaly N+1 detector) -
Run a specific test with a specific flag on or off (this is how it works for lower-level specs, but still needs to be implemented for E2E tests)
Quality ~"Quality:test-infra"
Edited by Mark Lapierre