From: adrianiurca Date: Mon, 16 Nov 2020 13:20:01 +0000 (+0200) Subject: skip bytecode test on oracle 7 X-Git-Tag: v2.8.0~10^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=19e4d3b66975bee3b7dcc2d3e19a6b15c75aa38a;p=puppet-modules%2Fpuppetlabs-firewall.git skip bytecode test on oracle 7 --- diff --git a/spec/acceptance/firewall_attributes_exceptions_spec.rb b/spec/acceptance/firewall_attributes_exceptions_spec.rb index 03937a7..a107e53 100644 --- a/spec/acceptance/firewall_attributes_exceptions_spec.rb +++ b/spec/acceptance/firewall_attributes_exceptions_spec.rb @@ -19,7 +19,7 @@ describe 'firewall basics', docker: true do # Skipping those from which we know they would fail. describe 'bytecode property', unless: (os[:family] == 'redhat' && os[:release][0] <= '6') || (os[:family] == 'sles' && os[:release][0..1] <= '11') || - (os[:family] == 'oraclelinux' && os[:release][0] <= '7') || + (get_os_name == 'oraclelinux' && os[:release][0] <= '7') || (os[:family] == 'ubuntu') do describe 'bytecode' do context '4,48 0 0 9,21 0 1 6,6 0 0 1,6 0 0 0' do diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 6682c44..66dfe5d 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -43,6 +43,10 @@ def update_profile_file run_shell("sed -i '/mesg n || true/c\\test -t 0 && mesg n || true' ~/.profile") end +def get_os_name # rubocop:disable Style/AccessorMethodName: Do not prefix reader method names with get_ + run_shell('facter os.name').stdout.delete("\n").downcase +end + RSpec.configure do |c| c.before :suite do if os[:family] == 'debian' && os[:release].to_i == 10