From: Roman Mueller Date: Sat, 29 Aug 2015 12:46:33 +0000 (+0200) Subject: Improve deprecation warning, add module name to it X-Git-Tag: 1.8.0~31^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=44184f23b9f0bb81f14a04bb6e7205365fbf7f63;p=puppet-modules%2Fpuppetlabs-firewall.git Improve deprecation warning, add module name to it --- diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index 2505655..72a67f9 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -289,7 +289,7 @@ Puppet::Type.newtype(:firewall) do EOS validate do |value| - Puppet.warning("port is deprecated and will be removed. Use dport and/or sport instead.") + Puppet.warning('Passing port to firewall is deprecated and will be removed. Use dport and/or sport instead.') end munge do |value| diff --git a/spec/unit/puppet/type/firewall_spec.rb b/spec/unit/puppet/type/firewall_spec.rb index ce0b4a2..38859f6 100755 --- a/spec/unit/puppet/type/firewall_spec.rb +++ b/spec/unit/puppet/type/firewall_spec.rb @@ -183,7 +183,7 @@ describe firewall do describe 'port deprecated' do it "raises a warning" do - expect(Puppet).to receive(:warning).with /port is deprecated/ + expect(Puppet).to receive(:warning).with /port to firewall is deprecated/ @resource[:port] = "22" end end