Skip to content

Commit

Permalink
use fact function again
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Apr 8, 2024
1 parent 7bec398 commit a1fe1cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spec/acceptance/cs_order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class { 'corosync':
end
end

if $facts['os']['family'] == 'RedHat'
if fact('os.family') == 'RedHat'
it 'creates a simple order constraint with Mandatory as kind' do
shell('cibadmin --query | grep first_then_two') do |r|
expect(r.stdout).to match(%r{kind="Mandatory"})
Expand Down Expand Up @@ -165,7 +165,7 @@ class { 'corosync':
end
end

if $facts['os']['family'] == 'RedHat'
if fact('os.family') == 'RedHat'
it 'creates a more complex order constraint with Optional as kind' do
shell('cibadmin --query | grep one_then_two_complex') do |r|
expect(r.stdout).to match(%r{kind="Optional"})
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/cs_primitive_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class { 'corosync':
},
}
EOS
if $facts['os']['family'] == 'RedHat'
if fact('os.family') == 'RedHat'
apply_manifest(pp, catch_failures: true, debug: false, trace: true)
apply_manifest(pp, catch_changes: true, debug: false, trace: true)
shell('pcs stonith show') do |r|
Expand Down
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 $facts['os']['family'] == 'Debian'
if fact('os.family') == 'Debian'
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Expand Down

0 comments on commit a1fe1cc

Please sign in to comment.