Skip to content

Commit

Permalink
test(packages_spec): refactor to check first part of version number only
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Dec 14, 2020
1 parent b778c62 commit a4f2f2c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/integration/default/controls/packages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,16 @@
when 'amazon'
case platform[:release]
when '2'
'7-12'
'7'
when '2018.03'
'6-8'
'6'
end
when 'centos'
if platform[:release].start_with?('8')
'8-8.el8'
elsif platform[:release].start_with?('7')
'7-13'
elsif platform[:release].start_with?('6')
'6-8'
end
platform[:release][0]
end

describe package(pkg) do
it { should be_installed }
its('version') { should eq version }
its('version') { should match(/^#{version}/) }
end
end

0 comments on commit a4f2f2c

Please sign in to comment.