diff --git a/.sync.yml b/.sync.yml index af3697c3..5fa35046 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,6 +1,7 @@ --- spec/spec_helper.rb: mock_with: ':mocha' + facterdb_string_keys: true .puppet-lint.rc: disabled_lint_checks: - anchor_resource diff --git a/spec/classes/selinux_config_mode_spec.rb b/spec/classes/selinux_config_mode_spec.rb index 2503821d..b2195ab7 100644 --- a/spec/classes/selinux_config_mode_spec.rb +++ b/spec/classes/selinux_config_mode_spec.rb @@ -7,7 +7,7 @@ context "on #{os}" do context 'when in enforcing mode' do let(:facts) do - override_facts(os_facts, os: { selinux: { + override_facts(os_facts, 'os' => { 'selinux' => { 'enabled' => true, 'enforced' => true, 'config_mode' => 'enforcing', @@ -68,7 +68,7 @@ let(:facts) do # Get a deep copy and then fully override the selinux facts result = override_facts(os_facts) - result[:os]['selinux'] = { 'enabled' => false } + result['os']['selinux'] = { 'enabled' => false } result end @@ -76,7 +76,7 @@ context "and requesting #{target_mode} mode" do let(:params) { { mode: target_mode } } - if os_facts[:osfamily] == 'Debian' + if os_facts['os']['family'] == 'Debian' it { is_expected.to contain_exec('activate-selinux') } else it { is_expected.not_to contain_exec('activate-selinux') } diff --git a/spec/defines/selinux_boolean_spec.rb b/spec/defines/selinux_boolean_spec.rb index 8e1966ea..f59413f3 100644 --- a/spec/defines/selinux_boolean_spec.rb +++ b/spec/defines/selinux_boolean_spec.rb @@ -16,7 +16,7 @@ context 'SELinux enabled' do let(:facts) do - override_facts(super(), os: { selinux: { enabled: true } }) + override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } }) end ['on', true, 'present'].each do |value| @@ -56,7 +56,7 @@ context 'SELinux disabled' do let(:facts) do - override_facts(super(), os: { selinux: { enabled: false } }) + override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } }) end ['on', true, 'present'].each do |value| diff --git a/spec/defines/selinux_module_spec.rb b/spec/defines/selinux_module_spec.rb index bd4596bd..d60725a1 100644 --- a/spec/defines/selinux_module_spec.rb +++ b/spec/defines/selinux_module_spec.rb @@ -19,7 +19,7 @@ context 'SELinux enabled' do let(:facts) do - override_facts(super(), os: { selinux: { enabled: true } }) + override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } }) end context 'ordering' do @@ -201,7 +201,7 @@ context 'SELinux disabled' do let(:facts) do - override_facts(super(), os: { selinux: { enabled: false } }) + override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } }) end context 'make sure it compiles' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3226b22d..b9b36691 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,7 +10,7 @@ require 'voxpupuli/test/spec_helper' RSpec.configure do |c| - c.facterdb_string_keys = false + c.facterdb_string_keys = true c.mock_with :mocha end