Skip to content

Commit f6d82f1

Browse files
committed
[Isolated] Test python pacakges are installed when in an ADC region
1 parent 2b8ecc1 commit f6d82f1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
context "when cookbook virtualenv not installed yet" do
1212
cached(:chef_run) do
1313
runner = runner(platform: platform, version: version) do |node|
14+
allow_any_instance_of(String).to receive(:start_with?).with("us-iso").and_return(true)
1415
node.override['cluster']['system_pyenv_root'] = system_pyenv_root
1516
node.override['cluster']['python-version'] = python_version
17+
node.override['cluster']['region'] = aws_region
1618
end
1719
runner.converge(described_recipe)
1820
end
@@ -34,10 +36,6 @@
3436
is_expected.to write_node_attributes('dump node attributes')
3537
end
3638
context "when in isolated region" do
37-
before do
38-
allow_any_instance_of(String).to receive(:start_with?).with("us-iso").and_return(true)
39-
end
40-
4139
it 'installs python packages' do
4240
is_expected.to run_bash("pip install").with(
4341
user: 'root',

0 commit comments

Comments
 (0)