Skip to content

let_it_be for spec/controllers

Thong Kuah requested to merge let_it_be into master

What does this MR do?

Replaces set in spec/controllers with let_it_be

set has not been updated since 2014, and has some gotchas. So we want to migrate away from set in favor of let_it_be incrementally.

Part of #27922 (closed)

Timings

set let_it_be
3m10.286s 3m14.774s
3m11.384s 3m18.986s
3m13.387s 3m13.877s

There seems to be no significant performance difference or regression, which is good

rspec command ``` time bin/rspec spec/controllers/admin/clusters_controller_spec.rb spec/controllers/admin/requests_profiles_controller_spec.rb spec/controllers/admin/users_controller_spec.rb spec/controllers/groups/clusters_controller_spec.rb spec/controllers/groups/labels_controller_spec.rb spec/controllers/groups/shared_projects_controller_spec.rb spec/controllers/import/bitbucket_server_controller_spec.rb spec/controllers/import/gitlab_projects_controller_spec.rb spec/controllers/projects/artifacts_controller_spec.rb spec/controllers/projects/autocomplete_sources_controller_spec.rb spec/controllers/projects/clusters_controller_spec.rb spec/controllers/projects/commit_controller_spec.rb spec/controllers/projects/environments/prometheus_api_controller_spec.rb spec/controllers/projects/environments_controller_spec.rb spec/controllers/projects/error_tracking_controller_spec.rb spec/controllers/projects/mirrors_controller_spec.rb spec/controllers/projects/pipeline_schedules_controller_spec.rb spec/controllers/projects/pipelines_controller_spec.rb spec/controllers/projects/pipelines_settings_controller_spec.rb spec/controllers/projects/settings/ci_cd_controller_spec.rb spec/controllers/projects/settings/operations_controller_spec.rb spec/controllers/projects/wikis_controller_spec.rb spec/controllers/projects_controller_spec.rb spec/controllers/search_controller_spec.rb ```

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading