From: adrianiurca Date: Mon, 16 Nov 2020 21:23:30 +0000 (+0200) Subject: change name to fetch_os_name X-Git-Tag: v2.8.0~10^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c9210366c797356d4f2125d61072a1da4cc1e44b;p=puppet-modules%2Fpuppetlabs-firewall.git change name to fetch_os_name --- diff --git a/spec/acceptance/firewall_attributes_exceptions_spec.rb b/spec/acceptance/firewall_attributes_exceptions_spec.rb index a107e53..426c500 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') || - (get_os_name == 'oraclelinux' && os[:release][0] <= '7') || + (fetch_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 b6d58ef..532d532 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -43,7 +43,7 @@ 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_ +def fetch_os_name @facter_os_name ||= run_shell('facter os.name').stdout.delete("\n").downcase end