diff --git a/testsuite/features/secondary/srv_power_management.feature b/testsuite/features/secondary/srv_power_management.feature index 442c882658f..156c616eab5 100644 --- a/testsuite/features/secondary/srv_power_management.feature +++ b/testsuite/features/secondary/srv_power_management.feature @@ -25,12 +25,12 @@ Feature: IPMI Power management And I should see a "Save" button Scenario: Save power management values - When I enter "127.0.0.1" as "powerAddress" + When I enter "fakeipmi" as "powerAddress" And I enter "ipmiusr" as "powerUsername" And I enter "test" as "powerPassword" And I click on "Save" Then I should see a "Power settings saved" text - And the cobbler report should contain "Power Management Address : 127.0.0.1" for "sle_minion" + And the cobbler report should contain "Power Management Address : fakeipmi" for "sle_minion" And the cobbler report should contain "Power Management Username : ipmiusr" for "sle_minion" And the cobbler report should contain "Power Management Password : test" for "sle_minion" And the cobbler report should contain "Power Management Type : ipmilan" for "sle_minion" @@ -75,7 +75,7 @@ Feature: IPMI Power management Then I should see a "Configuration successfully saved for 1 system(s)" text And the cobbler report should contain "Power Management Username : testing" for "sle_minion" And the cobbler report should contain "Power Management Password : qwertz" for "sle_minion" - And the cobbler report should contain "Power Management Address : 127.0.0.1" for "sle_minion" + And the cobbler report should contain "Power Management Address : fakeipmi" for "sle_minion" And the cobbler report should contain "Power Management Type : ipmilan" for "sle_minion" Scenario: Check power management SSM operation diff --git a/testsuite/features/secondary/srv_power_management_api.feature b/testsuite/features/secondary/srv_power_management_api.feature index 3df1aa363d9..42275bab502 100644 --- a/testsuite/features/secondary/srv_power_management_api.feature +++ b/testsuite/features/secondary/srv_power_management_api.feature @@ -15,11 +15,11 @@ Feature: IPMI Power management API Then power management results should have "ipmilan" for "powerType" Scenario: Save power management values for API test - When I set power management value "127.0.0.1" for "powerAddress" + When I set power management value "fakeipmi" for "powerAddress" And I set power management value "ipmiusr" for "powerUsername" And I set power management value "test" for "powerPassword" And I set power management value "ipmilan" for "powerType" - Then the cobbler report should contain "Power Management Address : 127.0.0.1" for "sle_minion" + Then the cobbler report should contain "Power Management Address : fakeipmi" for "sle_minion" And the cobbler report should contain "Power Management Username : ipmiusr" for "sle_minion" And the cobbler report should contain "Power Management Password : test" for "sle_minion" And the cobbler report should contain "Power Management Type : ipmilan" for "sle_minion" diff --git a/testsuite/features/step_definitions/command_steps.rb b/testsuite/features/step_definitions/command_steps.rb index 7e747b2bd00..71e45ed3b00 100644 --- a/testsuite/features/step_definitions/command_steps.rb +++ b/testsuite/features/step_definitions/command_steps.rb @@ -570,25 +570,11 @@ When(/^the server starts mocking an IPMI host$/) do server = get_target('server') - server.run('mkdir -p /etc/ipmi') - %w[ipmisim1.emu lan.conf fake_ipmi_host.sh].each do |file| - source = "#{File.dirname(__FILE__)}/../upload_files/#{file}" - dest = "/etc/ipmi/#{file}" - success = file_inject(get_target('server'), source, dest) - raise ScriptError, 'File injection failed' unless success - 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)[1].zero? - log 'ipmi_sim is already running; skipping startup.' - else - server.run('ipmi_sim -n < /dev/null > /dev/null &', verbose: true, check_errors: true) - end + server.run_local('podman run -d --rm --network uyuni -p [::]:623:623/udp -p [::]:9002:9002 --name fakeipmi ghcr.io/uyuni-project/uyuni/ci-fakeipmi:master', verbose: true, check_errors: true) 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 || :', verbose: false, check_errors: false) + get_target('server').run_local('podman kill fakeipmi') end When(/^the controller starts mocking a Redfish host$/) do