Skip to content

Commit

Permalink
Merge pull request #1075 from cyon/fix/allow_more_flexible_locations
Browse files Browse the repository at this point in the history
Remove location check of some random values to be set in the context of location
  • Loading branch information
juniorsysadmin authored Apr 13, 2017
2 parents fb1f122 + 9c3e0f7 commit c1bbad9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions manifests/resource/location.pp
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,6 @@
default => file,
}

if !($www_root or $proxy or $location_alias or $stub_status or $fastcgi or $uwsgi or $location_custom_cfg or $internal or $try_files or $location_allow or $location_deny) {
fail("Cannot create a location reference without a www_root, proxy, location_alias, stub_status, fastcgi, uwsgi, location_custom_cfg, internal, try_files, location_allow, or location_deny defined in ${server}:${title}")
}
if ($www_root and $proxy) {
fail("Cannot define both directory and proxy in ${server}:${title}")
}
Expand Down
10 changes: 0 additions & 10 deletions spec/defines/resource_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -876,16 +876,6 @@
it { is_expected.not_to contain_concat__fragment('server1-800-' + Digest::MD5.hexdigest('rspec-test') + '-ssl') }
end

context 'location type missing' do
let :params do
{
server: 'server1'
}
end

it { expect { is_expected.to contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, %r{Cannot create a location reference without a www_root, proxy, location_alias, stub_status, fastcgi, uwsgi, location_custom_cfg, internal, try_files, location_allow, or location_deny defined in server1:rspec-test}) }
end

context 'www_root and proxy are set' do
let :params do
{
Expand Down

0 comments on commit c1bbad9

Please sign in to comment.