Skip to content

Refactor agent_config_policy specs

Issue: Refactor remote_development policy specs in acc... (#513159 - closed)

What does this MR do and why?

With this MR we are refactoring agent_config_policy specs to use the matrix spec pattern in the remote_development domain and add documentation to our domain developer docs.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

  • Refactor ee/spec/policies/remote_development/remote_development_agent_config_policy_spec.rb
  • Refactor ee/spec/policies/remote_development/workspaces_agent_config_policy_spec.rb
  • Add new section to https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/remote_development/README.md to document this standard
  • Add the "policy debug helper" enable-able method to each spec (these are slightly different for each policy, and thus probably not worth trying to DRY up). Also document this pattern and the justifications behind "leaving debug code committed in specs".

Screenshots or screen recordings

This MR does not include any UI changes

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  • Checkout this branch
  • bin/rspec ./ee/spec/policies/remote_development/remote_development_agent_config_policy_spec.rb
  • bin/rspec ./ee/spec/policies/remote_development/workspaces_agent_config_policy_spec.rb
  • bin/rspec ./ee/spec/policies/remote_development/workspace_variable_policy_spec.rb
Edited by Daniyal Arshad

Merge request reports

Loading