Skip to content

Commit 96d1cbd

Browse files
committed
Fix failing unit tests
1 parent e568ae2 commit 96d1cbd

File tree

4 files changed

+1
-80
lines changed

4 files changed

+1
-80
lines changed

cookbooks/aws-parallelcluster-environment/resources/cfn_hup_configuration.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
variables(
9696
monitor_shared_dir: monitor_shared_dir,
9797
launch_template_resource_id: node['cluster']['launch_template_id'],
98-
update_dir: node['cluster']['shared_update_path']
9998
)
10099
end
101100
end

cookbooks/aws-parallelcluster-environment/spec/unit/resources/cfn_hup_configuration_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def self.configure(chef_run)
8484
launch_template_resource_id: LAUNCH_TEMPLATE_ID,
8585
update_hook_script_dir: SCRIPT_DIR,
8686
node_bootstrap_timeout: NODE_BOOTSTRAP_TIMEOUT,
87-
update_dir: "#{MONITOR_SHARED_DIR}/check_update",
8887
})
8988
end
9089

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

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,6 @@
5757
end
5858
end
5959

60-
context "when head node and cfn-hup disabled on fleet" do
61-
cached(:chef_run) do
62-
runner = runner(platform: platform, version: version) do |node|
63-
node.override['cluster']['node_type'] = 'HeadNode'
64-
node.override['cluster']['dcv_enabled'] = 'head_node'
65-
node.override['cluster']['in_place_update_on_fleet_enabled'] = 'false'
66-
allow_any_instance_of(Object).to receive(:dcv_installed?).and_return(true)
67-
end
68-
runner.converge(described_recipe)
69-
end
70-
cached(:node) { chef_run.node }
71-
72-
it 'has the correct content' do
73-
is_expected.to render_file('/etc/parallelcluster/parallelcluster_supervisord.conf')
74-
.with_content("[program:cfn-hup]")
75-
.with_content("[program:clustermgtd]")
76-
.with_content("[program:clusterstatusmgtd]")
77-
.with_content("[program:pcluster_dcv_authenticator]")
78-
.with_content("--port 8444")
79-
end
80-
end
81-
8260
context "when compute fleet" do
8361
cached(:chef_run) do
8462
runner = runner(platform: platform, version: version) do |node|
@@ -92,32 +70,16 @@
9270

9371
it 'has the correct content' do
9472
is_expected.to render_file('/etc/parallelcluster/parallelcluster_supervisord.conf')
95-
.with_content("[program:cfn-hup]")
9673
.with_content("[program:computemgtd]")
9774

9875
is_expected.not_to render_file('/etc/parallelcluster/parallelcluster_supervisord.conf')
9976
.with_content("[program:pcluster_dcv_authenticator]")
100-
end
101-
end
102-
103-
context "when compute fleet with cfn-hup disabled on fleet" do
104-
cached(:chef_run) do
105-
runner = runner(platform: platform, version: version) do |node|
106-
node.override['cluster']['node_type'] = 'ComputeFleet'
107-
node.override['cluster']['in_place_update_on_fleet_enabled'] = 'false'
108-
end
109-
runner.converge(described_recipe)
110-
end
111-
cached(:node) { chef_run.node }
112-
113-
it 'has the correct content' do
114-
is_expected.to render_file('/etc/parallelcluster/parallelcluster_supervisord.conf')
115-
.with_content("[program:computemgtd]")
11677

11778
is_expected.not_to render_file('/etc/parallelcluster/parallelcluster_supervisord.conf')
11879
.with_content("[program:cfn-hup]")
11980
end
12081
end
82+
12183
context "when login node and dcv configured" do
12284
cached(:chef_run) do
12385
runner = runner(platform: platform, version: version) do |node|
@@ -157,25 +119,6 @@
157119
.with_content("[program:pcluster_dcv_authenticator]")
158120
end
159121
end
160-
161-
context "when login node with cfn-hup disabled on fleet" do
162-
cached(:chef_run) do
163-
runner = runner(platform: platform, version: version) do |node|
164-
node.override['cluster']['node_type'] = 'LoginNode'
165-
node.override['cluster']['in_place_update_on_fleet_enabled'] = 'false'
166-
end
167-
runner.converge(described_recipe)
168-
end
169-
cached(:node) { chef_run.node }
170-
171-
it 'has the correct content' do
172-
is_expected.to render_file('/etc/parallelcluster/parallelcluster_supervisord.conf')
173-
.with_content("[program:loginmgtd]")
174-
175-
is_expected.not_to render_file('/etc/parallelcluster/parallelcluster_supervisord.conf')
176-
.with_content("[program:cfn-hup]")
177-
end
178-
end
179122
end
180123
end
181124
end

cookbooks/aws-parallelcluster-slurm/spec/unit/recipes/update_head_node_spec.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,6 @@
7373
end
7474
end
7575
end
76-
77-
context 'when cluster readiness check is disabled' do
78-
cached(:chef_run) do
79-
runner = runner(platform: platform, version: version) do |node|
80-
allow_any_instance_of(Object).to receive(:are_mount_or_unmount_required?).and_return(false)
81-
allow_any_instance_of(Object).to receive(:dig).and_return(true)
82-
allow_any_instance_of(Object).to receive(:cookbook_virtualenv_path).and_return(cookbook_venv_path)
83-
RSpec::Mocks.configuration.allow_message_expectations_on_nil = true
84-
85-
node.override['cluster']['stack_name'] = cluster_name
86-
node.override['cluster']['region'] = region
87-
node.override['cluster']['cluster_config_version'] = cluster_config_version
88-
node.override['cluster']['scripts_dir'] = scripts_dir
89-
end
90-
runner.converge(described_recipe)
91-
end
92-
it 'does not check cluster readiness' do
93-
is_expected.not_to run_execute("Check cluster readiness")
94-
end
95-
end
9676
end
9777
end
9878
end

0 commit comments

Comments
 (0)