Skip to content

Commit

Permalink
Fix more adjustments
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Gedon <dominik.gedon@suse.com>
  • Loading branch information
nodeg committed Oct 20, 2023
1 parent 800a0cd commit de1750e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions testsuite/features/secondary/srv_rename_hostname.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit de1750e

Please sign in to comment.