Skip to content

Commit

Permalink
(CAT-1628) Generalize version selection tests
Browse files Browse the repository at this point in the history
Update tests to check against installing the Major versions of the PDK.
This is due to the test environment only having certain versions available to install and thus necessitating that the version be update more often than is preferred.
  • Loading branch information
david22swan committed Apr 3, 2024
1 parent 1d50e25 commit ef34468
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 ef34468

Please sign in to comment.