Skip to content

Commit

Permalink
remove old switches for ubuntu 18 and lower
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Apr 8, 2024
1 parent 560483d commit 0891b5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
2 changes: 1 addition & 1 deletion spec/acceptance/cs_rsc_defaults_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'spec_helper_acceptance'

describe 'corosync' do
if fact('osfamily') == 'Debian'
if $facts['os']['family'] == 'Debian'

Check failure on line 6 in spec/acceptance/cs_rsc_defaults_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/GlobalVars: Do not introduce global variables. (https://rubystyle.guide#instance-vars, https://www.zenspider.com/ruby/quickref.html)
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Expand Down
14 changes: 2 additions & 12 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,8 @@
'0.9.0'
end
when 'Debian'
case fact_on(host, 'os.name')
when 'Debian'
default_provider = 'pcs'
pcs_version = '0.10.0'
when 'Ubuntu'
default_provider = 'pcs'
pcs_version = if fact_on(host, 'os.release.major').to_i > 18
'0.10.0'
else
'0.9.0'
end
end
default_provider = 'pcs'
pcs_version = '0.10.0'
when 'Suse'
default_provider = 'crm'
pcs_version = ''
Expand Down
14 changes: 2 additions & 12 deletions spec/spec_helper_corosync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,8 @@ def corosync_stack(facts)
'0.9.0'
end
when 'Debian'
case facts[:os]['name']
when 'Debian'
corosync_stack = 'pcs'
pcs_version = '0.10.0'
when 'Ubuntu'
corosync_stack = 'pcs'
pcs_version = if facts[:os]['release']['major'].to_i > 18
'0.10.0'
else
'0.9.0'
end
end
corosync_stack = 'pcs'
pcs_version = '0.10.0'
when 'Suse'
corosync_stack = 'crm'
pcs_version = ''
Expand Down

0 comments on commit 0891b5f

Please sign in to comment.