From d1ef4b698db47a56c12213628025002dfb5a5abe Mon Sep 17 00:00:00 2001 From: Giacomo Marciani Date: Fri, 21 Feb 2025 14:29:54 -0500 Subject: [PATCH] [Test] Fix Python version in kitchen tests related to AWS Batch and CFN Boostrap scripts. In particular, we expect all Oses to use Python 3.12.8, except for AL2 which uses 3.9.20. --- .../test/controls/awsbatch_virtualenv_spec.rb | 2 +- .../test/controls/cfn_bootstrap_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/aws-parallelcluster-awsbatch/test/controls/awsbatch_virtualenv_spec.rb b/cookbooks/aws-parallelcluster-awsbatch/test/controls/awsbatch_virtualenv_spec.rb index f9d3c33f2e..7b877b10f5 100644 --- a/cookbooks/aws-parallelcluster-awsbatch/test/controls/awsbatch_virtualenv_spec.rb +++ b/cookbooks/aws-parallelcluster-awsbatch/test/controls/awsbatch_virtualenv_spec.rb @@ -9,11 +9,11 @@ # This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. # See the License for the specific language governing permissions and limitations under the License. -python_version = '3.12.8' base_dir = "/opt/parallelcluster" pyenv_dir = "#{base_dir}/pyenv" control 'tag:install_awsbatch_virtualenv_created' do + python_version = os_properties.alinux2? ? '3.9.20' : '3.12.8' title "awsbatch virtualenv should be created on #{python_version}" only_if { !os_properties.redhat? } diff --git a/cookbooks/aws-parallelcluster-environment/test/controls/cfn_bootstrap_spec.rb b/cookbooks/aws-parallelcluster-environment/test/controls/cfn_bootstrap_spec.rb index db924c8807..132c3a94ed 100644 --- a/cookbooks/aws-parallelcluster-environment/test/controls/cfn_bootstrap_spec.rb +++ b/cookbooks/aws-parallelcluster-environment/test/controls/cfn_bootstrap_spec.rb @@ -9,11 +9,11 @@ # This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. # See the License for the specific language governing permissions and limitations under the License. -cfn_python_version = '3.12.8' base_dir = "/opt/parallelcluster" pyenv_dir = "#{base_dir}/pyenv" control 'tag:install_cfnbootstrap_virtualenv_created' do + cfn_python_version = os_properties.alinux2? ? '3.9.20' : '3.12.8' title "cfnbootstrap virtualenv should be created on #{cfn_python_version}" only_if { !os_properties.redhat_on_docker? }