Speed up design_policy_spec.rb
What does this MR do?
This MR speeds up design_policy_spec.rb
.
design_policy_spec.rb
has been flagged as a spec that we should attempt to speed up #229668 (closed). Also see https://gitlab.com/gitlab-org/plan/-/issues/145.
It was initially running at around 20s. After these changes the spec runs at around 7s.
Almost all of the time-saving is through the avoidance of assigning users to roles within the project
before each test, and instead, doing this work once at the beginning of all tests.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Luke Duncalfe