diff options
author | Ryan Davis <ryand-ruby@zenspider.com> | 2020-03-06 17:47:11 -0800 |
---|---|---|
committer | Ryan Davis <ryand-ruby@zenspider.com> | 2020-03-09 17:24:16 -0700 |
commit | 2b7e60bd682f24de96f2fc4b3ec29bdf4991a3b0 (patch) | |
tree | 13225931d513514da0622fb7b130eeba5ee5aacf | |
parent | 2050cf1e4260cbb539d700c1621066c6d9ae12b9 (diff) | |
download | chef-2b7e60bd682f24de96f2fc4b3ec29bdf4991a3b0.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>
-rw-r--r-- | spec/support/shared/integration/integration_helper.rb | 31 |
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 |