diff options
author | Stefano Rivera <stefano@rivera.za.net> | 2016-11-18 10:52:24 +0100 |
---|---|---|
committer | Stefano Rivera <stefano@rivera.za.net> | 2016-11-18 14:29:43 +0100 |
commit | ba5f4ea69ac06b6a5ebd237d95b217203211e3dc (patch) | |
tree | f61d1f56219f5ee8b7b28df056e85afa68f4a4e7 /spec | |
parent | 68ace98b002280a4bc1643149eb0dd94471c5bf5 (diff) | |
download | chef-ba5f4ea69ac06b6a5ebd237d95b217203211e3dc.tar.gz |
Unset http[s]_proxy in the subversion spec
So it doesn't alter generated subversion commands.
Signed-off-by: Stefano Rivera <stefanor@debian.org>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/subversion_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/provider/subversion_spec.rb b/spec/unit/provider/subversion_spec.rb index ac2a8dd754..a4ab4ae42c 100644 --- a/spec/unit/provider/subversion_spec.rb +++ b/spec/unit/provider/subversion_spec.rb @@ -32,6 +32,15 @@ describe Chef::Provider::Subversion do @events = Chef::EventDispatch::Dispatcher.new @run_context = Chef::RunContext.new(@node, {}, @events) @provider = Chef::Provider::Subversion.new(@resource, @run_context) + @original_env = ENV.to_hash + # Generated command lines would include any environmental proxies + ENV.delete("http_proxy") + ENV.delete("https_proxy") + end + + after do + ENV.clear + ENV.update(@original_env) end it "converts resource attributes to options for run_command and popen4" do |