Skip to content

Commit

Permalink
fix: cs_commit_spec.rb default provider on ubuntu not detected correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMeier committed Oct 13, 2024
1 parent 48a1154 commit 5079e58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/acceptance/cs_commit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -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'
Expand Down

0 comments on commit 5079e58

Please sign in to comment.