Skip to content

Commit 36964dd

Browse files
committed
Fix unit tests
1 parent f22884f commit 36964dd

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

cookbooks/aws-parallelcluster-environment/spec/unit/recipes/cfn_bootstrap_spec.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@
3232
)
3333
end
3434

35-
it 'installs python packages' do
36-
is_expected.to run_bash("pip install").with(
37-
user: 'root',
38-
group: 'root',
39-
cwd: "#{node['cluster']['base_dir']}"
40-
)
41-
end
42-
4335
it 'sets virtualenv path' do
4436
expect(node.default['cluster']['cfn_bootstrap_virtualenv_path']).to eq(virtualenv_path)
4537
is_expected.to write_node_attributes('dump node attributes')

cookbooks/aws-parallelcluster-platform/recipes/install/cookbook_virtualenv.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
bash 'pip install' do
4848
user 'root'
4949
group 'root'
50+
cwd "#{node['cluster']['base_dir']}"
5051
code <<-REQ
5152
#{virtualenv_path}/bin/pip install -r fail-pls
5253
if [ $? -ne 0 ]; then
53-
cd #{node['cluster']['base_dir']}
5454
tar xzf cookbook-dependencies.tgz
5555
cd dependencies
5656
#{virtualenv_path}/bin/pip install * -f ./ --no-index

cookbooks/aws-parallelcluster-platform/spec/unit/recipes/awscli_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
it 'downloads awscli-bundle from s3' do
1616
is_expected.to create_remote_file('download awscli bundle from s3').with(
1717
path: "#{file_cache_path}/awscli-bundle.zip",
18-
source: 'https://s3.amazonaws.com/aws-cli/awscli-bundle.zip',
18+
source: "https://awscli.test_aws_domain/awscli-exe-linux-#{node['kernel']['machine']}.zip",
1919
retries: 5,
2020
retry_delay: 5
2121
)
@@ -31,7 +31,7 @@
3131

3232
it 'installs awscli into cookbook virtualev path' do
3333
is_expected.to run_bash('install awscli')
34-
.with_code "#{cookbook_virtualenv_path}/bin/python #{file_cache_path}/awscli/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws"
34+
.with_code "#{file_cache_path}/awscli/aws/install -i /usr/local/aws -b /usr/local/bin"
3535
end
3636
end
3737

cookbooks/aws-parallelcluster-shared/resources/install_pyenv.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
action :run do
1616
python_version = new_resource.python_version || node['cluster']['python-version']
17-
python_url = "https://www.python.org/ftp/python/#{python_version}/Python-#{python_version}.tgz"
17+
python_url = "#{node['cluster']['artifacts_s3_url']}/dependencies/python/Python-#{python_version}.tgz"
1818

1919
if !aws_region.start_with?("us-iso") && new_resource.python_version
2020
python_url = "https://www.python.org/ftp/python/#{python_version}/Python-#{python_version}.tgz"

0 commit comments

Comments
 (0)