Skip to content

Commit

Permalink
Remove location check of some random values to be set in the context …
Browse files Browse the repository at this point in the history
…of location

Relates to #1074
  • Loading branch information
Dominic Luechinger committed Apr 12, 2017
1 parent b47c3d0 commit 9c3e0f7
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 9c3e0f7

Please sign in to comment.