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? }