From de1750e7c6ae525dcabcc36932bf537fd3be0a5c Mon Sep 17 00:00:00 2001 From: Dominik Gedon Date: Fri, 20 Oct 2023 15:51:14 +0200 Subject: [PATCH] Fix more adjustments Signed-off-by: Dominik Gedon --- testsuite/features/secondary/srv_rename_hostname.feature | 8 ++++---- testsuite/features/step_definitions/command_steps.rb | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/testsuite/features/secondary/srv_rename_hostname.feature b/testsuite/features/secondary/srv_rename_hostname.feature index 2897cd5248e3..607dff122faf 100644 --- a/testsuite/features/secondary/srv_rename_hostname.feature +++ b/testsuite/features/secondary/srv_rename_hostname.feature @@ -91,10 +91,10 @@ Feature: Reconfigure the server's hostname When I copy server's keys to the proxy And I configure the proxy Then I should see "proxy" via spacecmd - And I restart the "salt-minion" service on "proxy" - When service "salt-minion" is active on "proxy" - And I restart the "salt-broker" service on "proxy" - When service "salt-broker" is active on "proxy" + When I restart the "salt-minion" service on "proxy" + Then service "salt-minion" is active on "proxy" + When I restart the "salt-broker" service on "proxy" + Then service "salt-broker" is active on "proxy" @proxy Scenario: Apply high state on the proxy to populate new server CA diff --git a/testsuite/features/step_definitions/command_steps.rb b/testsuite/features/step_definitions/command_steps.rb index 9702eef9b0e6..ffd1f11416b2 100644 --- a/testsuite/features/step_definitions/command_steps.rb +++ b/testsuite/features/step_definitions/command_steps.rb @@ -1504,8 +1504,9 @@ hostname #{new_hostname} && echo '#{server_node.public_ip} #{server_node.full_hostname} #{old_hostname}' >> /etc/hosts && echo '#{server_node.public_ip} #{new_hostname}#{server_node.full_hostname.delete_prefix(server_node.hostname)} #{new_hostname}' >> /etc/hosts") - get_target('server', refresh: true) # This will refresh the attributes of this node - hostname, _result = get_target('server').run("hostname") + # This will refresh the attributes of this node + get_target('server', refresh: true) + hostname, _result = get_target('server').run('hostname') hostname.strip! raise "Wrong hostname after changing it. Is: #{hostname}, should be: #{new_hostname}" unless hostname == new_hostname @@ -1579,7 +1580,7 @@ sed -i \'$d\' /etc/hosts && sed -i \'$d\' /etc/hosts") get_target('server', refresh: true) # This will refresh the attributes of this node - hostname, _result = get_target('server').run("hostname") + hostname, _result = get_target('server').run('hostname') hostname.strip! raise "Wrong hostname after changing it. Is: #{hostname}, should be: #{new_hostname}" unless hostname == new_hostname