From 44184f23b9f0bb81f14a04bb6e7205365fbf7f63 Mon Sep 17 00:00:00 2001 From: Roman Mueller Date: Sat, 29 Aug 2015 14:46:33 +0200 Subject: [PATCH] Improve deprecation warning, add module name to it --- lib/puppet/type/firewall.rb | 2 +- spec/unit/puppet/type/firewall_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.45.2