Skip to content

Commit

Permalink
Merge pull request #1335 from puppetlabs/CAT-1628/main/generalize_tests
Browse files Browse the repository at this point in the history
(CAT-1628) Generalize version selection tests
  • Loading branch information
jordanbreen28 authored Apr 3, 2024
2 parents 1d50e25 + ef34468 commit ff6ae2b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions package-testing/spec/package/version_selection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

describe 'Test puppet & ruby version selection' do
module_name = 'version_selection'
# IMPORTANT: The following block should be updated with the latest version of each release supported for the
# test cases to pass. If you are running integration testing prior to a release and its failing due to missing Puppet
# gems, verify that the following versions are correct.
# IMPORTANT: The following block should be updated with the version of ruby that is included within the newest
# Puppet release for each major version. If you are running integration testing prior to a release and its
# failing, verify that the following versions are correct.
test_cases = [
{ envvar: 'PDK_PUPPET_VERSION', expected_puppet: '7.29.1', expected_ruby: '2.7.8' },
{ envvar: 'PDK_PUPPET_VERSION', expected_puppet: '8.5.1', expected_ruby: '3.2.2' }
{ envvar: 'PDK_PUPPET_VERSION', expected_puppet: '7', expected_ruby: '2.7.8' },
{ envvar: 'PDK_PUPPET_VERSION', expected_puppet: '8', expected_ruby: '3.2.2' }
]

before(:all) do
Expand All @@ -28,8 +28,8 @@

describe command('pdk bundle exec puppet --version') do
its(:exit_status) { is_expected.to eq(0) }
its(:stderr) { is_expected.to match(/using puppet (#{expected_puppet})/im) }
its(:stdout) { is_expected.to match(/^(#{expected_puppet})*/im) }
its(:stderr) { is_expected.to match(/using puppet (#{expected_puppet}\.\d+\.\d+)/im) }
its(:stdout) { is_expected.to match(/^(#{expected_puppet}\.\d+\.\d+)*/im) }
end

describe command('pdk bundle exec ruby --version') do
Expand Down

0 comments on commit ff6ae2b

Please sign in to comment.