From ef344687a089661c1f1d2ef8da47b74a9d06b465 Mon Sep 17 00:00:00 2001 From: david22swan Date: Mon, 11 Mar 2024 14:47:56 +0000 Subject: [PATCH 1/2] (CAT-1628) Generalize version selection tests 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. --- .../spec/package/version_selection_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-testing/spec/package/version_selection_spec.rb b/package-testing/spec/package/version_selection_spec.rb index 7a9294e20..4071536d9 100644 --- a/package-testing/spec/package/version_selection_spec.rb +++ b/package-testing/spec/package/version_selection_spec.rb @@ -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 @@ -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 From 9e304de1c8e2d6c859df5f9510985d46ee496cec Mon Sep 17 00:00:00 2001 From: david22swan Date: Mon, 8 Apr 2024 16:12:32 +0100 Subject: [PATCH 2/2] (MAINT) Bring in new template version Any changes made to the pdk-templates generated Gemfile need to be brought into the PDK between releases in order for the tests to function as they should. --- lib/pdk/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pdk/version.rb b/lib/pdk/version.rb index ba36e1ab4..9bb01193f 100644 --- a/lib/pdk/version.rb +++ b/lib/pdk/version.rb @@ -1,4 +1,4 @@ module PDK VERSION = '3.0.1'.freeze - TEMPLATE_REF = '3.0.1.2'.freeze + TEMPLATE_REF = '3.0.1.3'.freeze end