Skip to content

Commit

Permalink
Replace legacy facts with modern equivalents
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Aug 24, 2022
1 parent 5794f89 commit 6e25548
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@

it { is_expected.to contain_package('nginx') }

if (facts[:lsbdistid] == 'Debian' && %w[10 11].include?(facts.dig(:os, 'release', 'major'))) ||
(facts[:lsbdistid] == 'Ubuntu' && %w[bionic focal jammy].include?(facts[:lsbdistcodename]))
if (facts.dig(:os, 'name') == 'Debian' && %w[10 11].include?(facts.dig(:os, 'release', 'major'))) ||
(facts.dig(:os, 'name') == 'Ubuntu' && %w[bionic focal jammy].include?(facts.dig(:os, 'distro', 'codename')))
it { is_expected.to contain_package('libnginx-mod-http-passenger') }
else
it { is_expected.to contain_package('passenger') }
Expand Down

0 comments on commit 6e25548

Please sign in to comment.