Skip to content

Commit

Permalink
Use new other hostname for the test
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 b3d9f6e commit 00c87fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@
When(/^I change the server's short hostname from hosts and hostname files$/) do
server_node = get_target('server')
old_hostname = server_node.hostname
new_hostname = old_hostname + '2'
new_hostname = old_hostname + '-renamed'
log "Old hostname: #{old_hostname} - New hostname: #{new_hostname}"
server_node.run("sed -i 's/#{old_hostname}/#{new_hostname}/g' /etc/hostname &&
hostname #{new_hostname} &&
Expand Down Expand Up @@ -1534,7 +1534,7 @@
When(/^I change back the server's hostname$/) do
server_node = get_target('server')
old_hostname = server_node.hostname
new_hostname = old_hostname.delete_suffix('2')
new_hostname = old_hostname.delete_suffix('-renamed')
log "Old hostname: #{old_hostname} - New hostname: #{new_hostname}"
server_node.run("sed -i 's/#{old_hostname}/#{new_hostname}/g' /etc/hostname &&
hostname #{new_hostname} &&
Expand Down

0 comments on commit 00c87fb

Please sign in to comment.