Skip to content

Commit

Permalink
switch facts to os_facts
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Oct 28, 2022
1 parent c2b5689 commit 051aa14
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions spec/classes/vault_spec.rb
Expand Up @@ -3,13 +3,9 @@
require 'spec_helper'

describe 'vault' do
let :node do
'agent.example.com'
end

on_supported_os.each do |os, facts|
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { override_facts(facts, service_provider: 'systemd', processors: { count: 3 }) }
let(:facts) { override_facts(os_facts, processors: { count: 3 }) }

context 'vault class with simple configuration' do
let(:params) do
Expand Down Expand Up @@ -211,7 +207,7 @@
}
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'Debian'
it { is_expected.not_to contain_apt__source('HashiCorp') }
when 'RedHat'
Expand All @@ -227,7 +223,7 @@
}
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'Debian'
it { is_expected.not_to contain_apt__source('HashiCorp') }
when 'RedHat'
Expand All @@ -243,7 +239,7 @@
}
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'Debian'
it { is_expected.to contain_apt__source('HashiCorp') }
when 'RedHat'
Expand Down Expand Up @@ -414,9 +410,9 @@
}
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'RedHat'
case facts[:os]['release']['major'].to_i
case os_facts[:os]['release']['major'].to_i
when 7
context 'RedHat >=7 specific' do
context 'includes systemd init script' do
Expand Down

0 comments on commit 051aa14

Please sign in to comment.