Skip to content

Commit

Permalink
Improve impi with comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maximenoel8 committed Nov 14, 2024
1 parent 297f81f commit 8da9611
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,16 +579,16 @@
end
server.run('chmod +x /etc/ipmi/fake_ipmi_host.sh', verbose: true, check_errors: true)
# Check if ipmi_sim is already running
if server.run('pgrep -f ipmi_sim', verbose: false, check_errors: false).empty?
if server.run('pgrep -f ipmi_sim', verbose: false, check_errors: false)[1] != 0
server.run('ipmi_sim -n < /dev/null > /dev/null &', verbose: true, check_errors: true)
else
puts 'ipmi_sim is already running; skipping startup.'
log 'ipmi_sim is already running; skipping startup.'
end
end

When(/^the server stops mocking an IPMI host$/) do
get_target('server').run('pkill ipmi_sim')
get_target('server').run('pkill --full fake_ipmi_host.sh || :')
get_target('server').run('pkill --full fake_ipmi_host.sh', verbose: false, check_errors: false)
end

When(/^the controller starts mocking a Redfish host$/) do
Expand Down

0 comments on commit 8da9611

Please sign in to comment.