Skip to content

Extract spec_helper from chef_helper

Richard Clamp requested to merge rc-3187-split-rspec-helpers into master

What does this MR do?

chef_helper loads a lot of chef related testing libraries, and includes a call to ohai to configure them. This is not always needed when testing library code/rake tasks.

When running examples directly from the command-line during development we can see a speedup of around 1.5 seconds, by using the reduced spec_helper rather than the full chef_helper.

To verify compare the runtime of bundle exec spec/gitlab-ctl-commands-ee/lib/consul_spec.rb (or another rspec file using just spec_helper) between this branch and master.

Checklist

See Definition of done.

  • Change added to CHANGELOG.md. Not applicable for Documentation changes and minor changes.
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA, if applicable
  • MR targeting master branch
  • MR has a green pipeline on GitLab.com

Reviewer Checklist

In addition to above, reviewer must:

  • Pipeline is green on dev.gitlab.org if the change is not touching documentation or internal cookbooks

References

Closes #3187 (closed)

Edited by Richard Clamp

Merge request reports