Skip to content

Commit

Permalink
Align unit tests with code
Browse files Browse the repository at this point in the history
The code is only executed on osfamily RedHat with major version below 7.
The unit tests did only skip the tests on RedHat 7 but not on 8.

Removes errors:
rspec './spec/classes/update_spec.rb[1:9:3:1]' # ca_cert::update on redhat-8-x86_64 with force_enable set to true is expected to contain Exec[enable_ca_trust] with command => "update-ca-trust force-enable"
rspec './spec/classes/update_spec.rb[1:9:4:1]' # ca_cert::update on redhat-8-x86_64 with force_enable set to false is expected to contain Exec[enable_ca_trust] with command => "update-ca-trust enable"
  • Loading branch information
Phil Friderici committed Aug 10, 2023
1 parent b7e6e1e commit 315e52e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/classes/update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)
}
when 'RedHat'
if facts[:os]['release']['major'] == '7'
if facts[:os]['release']['major'] >= '7'
it { is_expected.not_to contain_exec('enable_ca_trust') }
else
context 'with force_enable set to true' do
Expand Down

0 comments on commit 315e52e

Please sign in to comment.