From 5079e58b9c4cfef0b7f5b9790071fbaf5fbd0c82 Mon Sep 17 00:00:00 2001 From: Christoph Maser Date: Sun, 13 Oct 2024 18:29:31 +0200 Subject: [PATCH] fix: cs_commit_spec.rb default provider on ubuntu not detected correctly --- spec/acceptance/cs_commit_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/acceptance/cs_commit_spec.rb b/spec/acceptance/cs_commit_spec.rb index dff1f2b9..550735df 100644 --- a/spec/acceptance/cs_commit_spec.rb +++ b/spec/acceptance/cs_commit_spec.rb @@ -102,7 +102,7 @@ class { 'corosync': end it 'creates the vip resource in the cib' do - command = if fact('default_provider') == 'pcs' + command = if fact('default_provider') == 'pcs' && fact('os.name') != 'Ubuntu' if Gem::Version.new(fact('pcs_version')) < Gem::Version.new('0.10.0') 'pcs resource show' else @@ -139,7 +139,7 @@ class { 'corosync': end it 'creates the vip resource in the shadow cib' do - command = if fact('default_provider') == 'pcs' + command = if fact('default_provider') == 'pcs' && fact('os.name') != 'Ubuntu' if Gem::Version.new(fact('pcs_version')) < Gem::Version.new('0.10.0') "pcs resource show -f #{pcs_shadow_cib}" else @@ -154,7 +154,7 @@ class { 'corosync': end it 'creates the service resource in the shadow cib' do - command = if fact('default_provider') == 'pcs' + command = if fact('default_provider') == 'pcs' && fact('os.name') != 'Ubuntu' if Gem::Version.new(fact('pcs_version')) < Gem::Version.new('0.10.0') "pcs resource show -f #{pcs_shadow_cib}" else @@ -169,7 +169,7 @@ class { 'corosync': end it 'creates the colocation in the shadow cib and apache2_vip is the "with" resource' do - command = if fact('default_provider') == 'pcs' + command = if fact('default_provider') == 'pcs' && fact('os.name') != 'Ubuntu' "pcs cluster cib -f #{pcs_shadow_cib} | grep apache2_vip_with_service" else 'CIB_shadow=puppet cibadmin --query | grep apache2_vip_with_service' @@ -180,7 +180,7 @@ class { 'corosync': end it 'creates the colocation in the shadow cib and apache2_service is the main resource' do - command = if fact('default_provider') == 'pcs' + command = if fact('default_provider') == 'pcs' && fact('os.name') != 'Ubuntu' "pcs cluster cib -f #{pcs_shadow_cib} | grep apache2_vip_with_service" else 'CIB_shadow=puppet cibadmin --query | grep apache2_vip_with_service'