From a521da2c100b9aba05b04254a8c6aa886a321427 Mon Sep 17 00:00:00 2001 From: Ciaran McCrisken Date: Wed, 5 Aug 2020 17:13:09 +0100 Subject: [PATCH] (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. --- spec/spec_helper_acceptance_local.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.45.2