diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb index 133e45865a..db4628a44e 100644 --- a/lib/puppet/type/file/source.rb +++ b/lib/puppet/type/file/source.rb @@ -368,13 +368,7 @@ def handle_response_error(response) defaultto :ignore newvalues(:use, :use_when_creating, :ignore) munge do |value| - value = value ? value.to_sym : :ignore - if @resource.file && @resource.line && value != :ignore - # TRANSLATORS "source_permissions" is a parameter name and should not be translated - Puppet.puppet_deprecation_warning(_("The `source_permissions` parameter is deprecated. Explicitly set `owner`, `group`, and `mode`."), file: @resource.file, line: @resource.line) - end - - value + value ? value.to_sym : :ignore end end end diff --git a/spec/integration/type/file_spec.rb b/spec/integration/type/file_spec.rb index 72add66482..168668a584 100644 --- a/spec/integration/type/file_spec.rb +++ b/spec/integration/type/file_spec.rb @@ -1309,21 +1309,6 @@ def build_path(dir) end describe "when sourcing" do - it "should give a deprecation warning when the user sets source_permissions" do - expect(Puppet).to receive(:puppet_deprecation_warning).with( - 'The `source_permissions` parameter is deprecated. Explicitly set `owner`, `group`, and `mode`.', - {:file => 'my/file.pp', :line => 5}) - - catalog.add_resource described_class.new(:path => path, :content => 'this is content', :source_permissions => :use_when_creating) - catalog.apply - end - - it "should not give a deprecation warning when the user does not set source_permissions" do - expect(Puppet).not_to receive(:puppet_deprecation_warning) - catalog.add_resource described_class.new(:path => path, :content => 'this is content') - catalog.apply - end - with_checksum_types "source", "default_values" do before(:each) do set_mode(0770, checksum_file) diff --git a/spec/unit/configurer/downloader_spec.rb b/spec/unit/configurer/downloader_spec.rb index c7c0e9d168..c8b02d08d3 100644 --- a/spec/unit/configurer/downloader_spec.rb +++ b/spec/unit/configurer/downloader_spec.rb @@ -165,11 +165,6 @@ def generate_file_resource(options = {}) expect(@dler.catalog.host_config).to eq(false) end - it "should not issue a deprecation warning for source_permissions" do - expect(Puppet).not_to receive(:puppet_deprecation_warning) - catalog = @dler.catalog - expect(catalog.resources.size).to eq(1) # Must consume catalog to fix warnings - end end describe "when downloading" do