Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-1628) Generalize version selection tests #1335

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading