summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorStefano Rivera <stefano@rivera.za.net>2016-11-18 10:52:24 +0100
committerStefano Rivera <stefano@rivera.za.net>2016-11-18 14:29:43 +0100
commitba5f4ea69ac06b6a5ebd237d95b217203211e3dc (patch)
treef61d1f56219f5ee8b7b28df056e85afa68f4a4e7 /spec
parent68ace98b002280a4bc1643149eb0dd94471c5bf5 (diff)
downloadchef-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.rb9
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