diff --git a/manifests/resource/location.pp b/manifests/resource/location.pp index 8ed298a0c..7e62861fd 100644 --- a/manifests/resource/location.pp +++ b/manifests/resource/location.pp @@ -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}") } diff --git a/spec/defines/resource_location_spec.rb b/spec/defines/resource_location_spec.rb index 843d5db1d..bb66631a6 100644 --- a/spec/defines/resource_location_spec.rb +++ b/spec/defines/resource_location_spec.rb @@ -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 {