summaryrefslogtreecommitdiff
path: root/chef-config/spec
diff options
context:
space:
mode:
authorSalim Alam <salam@chef.io>2016-03-21 15:52:13 -0700
committerSalim Alam <salam@chef.io>2016-03-21 21:23:08 -0700
commit54934c5101d1c953595d820eb178c8479fdee295 (patch)
treebe13c79f86f35189cbedbab48fbefe0ecae9390b /chef-config/spec
parent3b500ca0714e95584411c109fd6d4000dee9d50e (diff)
downloadchef-54934c5101d1c953595d820eb178c8479fdee295.tar.gz
Fix proxified socket
Diffstat (limited to 'chef-config/spec')
-rw-r--r--chef-config/spec/unit/config_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb
index 5e3703e9b5..72c0981eca 100644
--- a/chef-config/spec/unit/config_spec.rb
+++ b/chef-config/spec/unit/config_spec.rb
@@ -684,6 +684,19 @@ RSpec.describe ChefConfig::Config do
end
describe "export_proxies" do
+ before(:all) do
+ @original_env = ENV.to_hash
+ ENV["http_proxy"] = nil
+ ENV["https_proxy"] = nil
+ ENV["ftp_proxy"] = nil
+ ENV["no_proxy"] = nil
+ end
+
+ after(:all) do
+ ENV.clear
+ ENV.update(@original_env)
+ end
+
let(:http_proxy) { "http://localhost:7979" }
let(:https_proxy) { "https://localhost:7979" }
let(:ftp_proxy) { "ftp://localhost:7979" }