From: Ciaran McCrisken Date: Wed, 5 Aug 2020 16:13:09 +0000 (+0100) Subject: (IAC-1025) Fix spec test helper method X-Git-Tag: v2.6.0~5^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a521da2c100b9aba05b04254a8c6aa886a321427;p=puppet-modules%2Fpuppetlabs-firewall.git (IAC-1025) Fix spec test helper method Tests failing on RHEL systems as the `install_iptables` method always assumed it was running against Debian / Ubuntu. --- diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index ca4783a..6682c44 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -20,7 +20,11 @@ end def install_iptables run_shell('iptables -V') rescue - run_shell('apt-get install iptables -y') + if os[:family] == 'redhat' + run_shell('yum install iptables-services -y') + else + run_shell('apt-get install iptables -y') + end end def iptables_version