Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
enrico-usai authored Oct 19, 2023
2 parents 4a71bcf + 635d556 commit 44ed173
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@ suites:
verifier:
controls:
- /awsbatch_virtualenv_created/
- name: custom_awsbatchcli_package
run_list:
- recipe[aws-parallelcluster-awsbatch::install]
verifier:
controls:
- /custom_awsbatchcli_package_installed/
attributes:
cluster:
custom_awsbatchcli_package: https://github.com/aws/aws-parallelcluster/archive/develop.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright:: 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file accompanying this file.
# 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.

control 'custom_awsbatchcli_package_installed' do
title "custom aws-parallelcluster-awsbatch-cli should have been installed in the virtualenv"
only_if { !os_properties.redhat_on_docker? }

describe command("#{node['cluster']['awsbatch_virtualenv_path']}/bin/pip freeze | grep aws-parallelcluster-awsbatch-cli") do
its('exit_status') { should eq(0) }
its('stdout') { should match "aws-parallelcluster-awsbatch-cli" }
end

describe command("#{node['cluster']['awsbatch_virtualenv_path']}/bin/awsbsub --help") do
its('exit_status') { should eq(0) }
its('stdout') { should match "usage: awsbsub" }
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,11 @@
# See the License for the specific language governing permissions and limitations under the License.

control 'custom_parallelcluster_node_installed' do
file_cache_path = "/tmp/kitchen/cache"

title "custom aws-parallelcluster-node should have been installed in the node virtualenv"
only_if { !os_properties.redhat_on_docker? }

# Unless we fix the version of aws-parallelcluster-node to be installed, we cannot really say from pip if a custom
# node package was installed. The only thing we can test is that the custom node recipe was triggered, which can
# be verified from some artifacts left in the kitchen cache folder.
describe file("#{file_cache_path}/aws-parallelcluster-node.tgz") do
it { should exist }
end
describe directory("#{file_cache_path}/aws-parallelcluster-custom-node") do
it { should exist }
describe command("#{node['cluster']['node_virtualenv_path']}/bin/pip freeze | grep aws-parallelcluster-node") do
its('exit_status') { should eq(0) }
its('stdout') { should match "aws-parallelcluster-node" }
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ verifier:
- cookbooks/aws-parallelcluster-shared/test
- cookbooks/aws-parallelcluster-slurm/test

provisioner:
attributes:
cluster:
# The following parameters are required when running install recipes on system tests
region: us-east-1
custom_node_package: https://github.com/aws/aws-parallelcluster-node/archive/develop.tar.gz
custom_awsbatchcli_package: https://github.com/aws/aws-parallelcluster/archive/develop.tar.gz

suites:
- name: entrypoints_install
run_list:
Expand Down
1 change: 0 additions & 1 deletion kitchen.global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ provisioner:
cluster:
# right now tests depend on this parameter: we will try to remove the dependency later
region: us-east-1
parallelcluster-node-version: '3.4.1'

lifecycle:
<% %w(pre post).each do |prefix| %>
Expand Down

0 comments on commit 44ed173

Please sign in to comment.