summaryrefslogtreecommitdiff
path: root/spec/support/shared/integration/integration_helper.rb
diff options
context:
space:
mode:
authorRyan Davis <ryand-ruby@zenspider.com>2020-03-06 17:47:11 -0800
committerTim Smith <tsmith84@gmail.com>2020-03-16 11:57:07 -0700
commit88c07f9d240d90efe269a776f698c6b7ce47e067 (patch)
treeb3073676d903b2e9d285ec396fa6d8006974d76a /spec/support/shared/integration/integration_helper.rb
parent6e826423e240d71017a4fc9ab9f25f490ec859ad (diff)
downloadchef-88c07f9d240d90efe269a776f698c6b7ce47e067.tar.gz
CONTROVERSIAL: remove "with a chef repo" shared context.
It's provided by cheffish, but with one difference (force). Unfortunately, that force can't be pushed to cheffish as-is because it relies on ChefUtils.windows?. This could be changed to something else... A global for all I care. But, we might not want to push this commit yet. I just can't stand the noise in the test output as I try to clean this stuff up. Signed-off-by: Ryan Davis <zenspider@chef.io>
Diffstat (limited to 'spec/support/shared/integration/integration_helper.rb')
-rw-r--r--spec/support/shared/integration/integration_helper.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb
index 7e52f6a9f8..ea1f3accd5 100644
--- a/spec/support/shared/integration/integration_helper.rb
+++ b/spec/support/shared/integration/integration_helper.rb
@@ -106,37 +106,6 @@ module IntegrationSupport
Dir.chdir(path_to(relative_path))
end
- RSpec.shared_context "with a chef repo" do
- before :each do
- raise "Can only create one directory per test" if @repository_dir
-
- @repository_dir = Dir.mktmpdir("chef_repo")
- Chef::Config.chef_repo_path = @repository_dir
- %w{client cookbook data_bag environment node role user}.each do |object_name|
- Chef::Config.delete("#{object_name}_path".to_sym)
- end
- end
-
- after :each do
- if @repository_dir
- begin
- %w{client cookbook data_bag environment node role user}.each do |object_name|
- Chef::Config.delete("#{object_name}_path".to_sym)
- end
- Chef::Config.delete(:chef_repo_path)
- # TODO: "force" actually means "silence all exceptions". this
- # silences a weird permissions error on Windows that we should track
- # down, but for now there's no reason for it to blow up our CI.
- FileUtils.remove_entry_secure(@repository_dir, force = ChefUtils.windows?)
- ensure
- @repository_dir = nil
- end
- end
- Dir.chdir(@old_cwd) if @old_cwd
- end
-
- end
-
# Versioned cookbooks
RSpec.shared_context "with versioned cookbooks", versioned_cookbooks: true do