From 0891b5fab7d08d6b202ddbc4a45e99fdce2689ab Mon Sep 17 00:00:00 2001 From: markuszilch Date: Mon, 8 Apr 2024 22:58:30 +0200 Subject: [PATCH] remove old switches for ubuntu 18 and lower --- spec/acceptance/cs_rsc_defaults_spec.rb | 2 +- spec/spec_helper_acceptance.rb | 14 ++------------ spec/spec_helper_corosync.rb | 14 ++------------ 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/spec/acceptance/cs_rsc_defaults_spec.rb b/spec/acceptance/cs_rsc_defaults_spec.rb index 581efe06..8df72918 100644 --- a/spec/acceptance/cs_rsc_defaults_spec.rb +++ b/spec/acceptance/cs_rsc_defaults_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper_acceptance' describe 'corosync' do - if fact('osfamily') == 'Debian' + if $facts['os']['family'] == 'Debian' cert = '-----BEGIN CERTIFICATE----- MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 0ee5e434..00177b0d 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -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 = '' diff --git a/spec/spec_helper_corosync.rb b/spec/spec_helper_corosync.rb index a726ae86..566402af 100644 --- a/spec/spec_helper_corosync.rb +++ b/spec/spec_helper_corosync.rb @@ -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 = ''