]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Merge pull request #145 from ecbypi/ticket/20096-fedora-systemd-support
authorKen Barber <ken@bob.sh>
Sat, 13 Apr 2013 20:06:46 +0000 (13:06 -0700)
committerKen Barber <ken@bob.sh>
Sat, 13 Apr 2013 20:06:46 +0000 (13:06 -0700)
(20096) Support systemd on Fedora 15 and up

1  2 
lib/puppet/util/firewall.rb
spec/unit/puppet/util/firewall_spec.rb

Simple merge
index 6345966308fd220ac1707c5da096d4452b1e07e0,f8a71038bab01d6b66fc3aa57b5cc9b46e2f3cb2..1fcba737258b238dd36dd21f5bc7ba807f8639fc
@@@ -108,14 -119,10 +119,16 @@@ describe 'Puppet::Util::Firewall' d
          subject.persist_iptables(proto)
        end
  
 +      it 'should exec for Archlinux identified from osfamily' do
 +        Facter.fact(:osfamily).stubs(:value).returns('Archlinux')
 +        subject.expects(:execute).with(['/bin/sh', '-c', '/usr/sbin/iptables-save > /etc/iptables/iptables.rules'])
 +        subject.persist_iptables(proto)
 +      end
 +
        it 'should raise a warning when exec fails' do
          Facter.fact(:osfamily).stubs(:value).returns('RedHat')
+         Facter.fact(:operatingsystem).stubs(:value).returns('RedHat')
          subject.expects(:execute).with(%w{/sbin/service iptables save}).
            raises(Puppet::ExecutionFailure, 'some error')
          subject.expects(:warning).with('Unable to persist firewall rules: some error')