Skip to content
Snippets Groups Projects
Commit cc2d067ea2a2 authored by DJ Mountney's avatar DJ Mountney
Browse files

Update the chef_helper to auto-type the chef tests

This allows us to target their before block to just their tests
parent 1e0599e327a7
No related branches found
No related tags found
1 merge request!72Intermediate build for testing purposes
......@@ -45,7 +45,11 @@
config.cookbook_path = ['files/gitlab-cookbooks/', 'spec/chef/fixtures/cookbooks']
config.log_level = :error
config.before do
config.define_derived_metadata(file_path: Regexp.new('/spec/chef/')) do |metadata|
metadata[:type] = :chef
end
config.before(:each, type: :chef) do
stub_command('id -Z').and_return(false)
stub_command("grep 'CS:123456:respawn:/opt/gitlab/embedded/bin/runsvdir-start' /etc/inittab").and_return('')
stub_command(%r{\(test -f /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-\h+-\) && \(cat /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-\h+- | grep -Fx 0\)}).and_return(false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment