diff options
Diffstat (limited to 'chef-config')
-rw-r--r-- | chef-config/chef-config.gemspec | 1 | ||||
-rw-r--r-- | chef-config/spec/unit/config_spec.rb | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/chef-config/chef-config.gemspec b/chef-config/chef-config.gemspec index afbd69f188..100cc54a17 100644 --- a/chef-config/chef-config.gemspec +++ b/chef-config/chef-config.gemspec @@ -17,6 +17,7 @@ Gem::Specification.new do |spec| spec.add_dependency "mixlib-shellout", "~> 2.0" spec.add_dependency "mixlib-config", "~> 2.0" + spec.add_dependency "fuzzyurl", '~> 0.8.0' spec.add_development_dependency "rake", "~> 10.0" diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb index 3bada755de..5e3703e9b5 100644 --- a/chef-config/spec/unit/config_spec.rb +++ b/chef-config/spec/unit/config_spec.rb @@ -908,6 +908,28 @@ RSpec.describe ChefConfig::Config do it { is_expected.to eq nil } end + + context "when no_proxy is a domain with a dot prefix" do + let(:env) do + { + "http_proxy" => proxy, + "no_proxy" => ".example.com", + } + end + + it { is_expected.to eq nil } + end + + context "when no_proxy is a domain with no wildcard" do + let(:env) do + { + "http_proxy" => proxy, + "no_proxy" => "example.com", + } + end + + it { is_expected.to eq nil } + end end end |