@@ -61,15 +61,15 @@ def self.update(chef_run)
61
61
. with ( group : 'root' )
62
62
. with ( mode : '0644' )
63
63
end
64
- command = "#{ cookbook_env } /bin/python #{ script_dir } /slurm/pcluster_topology_generator.py" \
64
+ command = "#{ cookbook_env } /bin/python #{ script_dir } /slurm/pcluster_topology_generator.py" \
65
65
" --output-file #{ slurm_install_dir } /etc/topology.conf" \
66
66
" --block-sizes #{ block_sizes } " \
67
67
" --input-file #{ cluster_config } "
68
- if [ 'true' , 'yes' , true ] . include? ( force_configuration )
69
- command_to_exe = "#{ command } #{ force_configuration_extra_args } "
70
- else
71
- command_to_exe = "#{ command } "
72
- end
68
+ command_to_exe = if [ 'true' , 'yes' , true ] . include? ( force_configuration )
69
+ "#{ command } #{ force_configuration_extra_args } "
70
+ else
71
+ "#{ command } "
72
+ end
73
73
it 'generates topology config when block sizes are present' do
74
74
expect ( chef_run ) . to run_execute ( 'generate_topology_config' )
75
75
. with ( command : command_to_exe )
@@ -115,11 +115,11 @@ def self.update(chef_run)
115
115
" --output-file #{ slurm_install_dir } /etc/topology.conf" \
116
116
" --input-file #{ cluster_config } " \
117
117
"#{ topo_command_args } "
118
- if [ 'true' , 'yes' , true ] . include? ( force_configuration )
119
- command_to_exe = "#{ command } #{ force_configuration_extra_args } "
120
- else
121
- command_to_exe = "#{ command } "
122
- end
118
+ command_to_exe = if [ 'true' , 'yes' , true ] . include? ( force_configuration )
119
+ "#{ command } #{ force_configuration_extra_args } "
120
+ else
121
+ "#{ command } "
122
+ end
123
123
124
124
it 'creates the topology configuration template' do
125
125
expect ( chef_run ) . to create_template ( "#{ slurm_install_dir } /etc/slurm_parallelcluster_topology.conf" )
@@ -132,12 +132,12 @@ def self.update(chef_run)
132
132
if topo_command_args . nil?
133
133
it 'update or cleanup topology.conf when block sizes are present' do
134
134
expect ( chef_run ) . not_to run_execute ( 'update or cleanup topology.conf' )
135
- . with ( command : command_to_exe )
135
+ . with ( command : command_to_exe )
136
136
end
137
137
else
138
138
it 'update or cleanup topology.conf when block sizes are present' do
139
139
expect ( chef_run ) . to run_execute ( 'update or cleanup topology.conf' )
140
- . with ( command : command_to_exe )
140
+ . with ( command : command_to_exe )
141
141
end
142
142
end
143
143
0 commit comments