Skip to content

Commit

Permalink
QE: Move Salt high state step to correct place
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 c54dc33 commit 693e63a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions testsuite/.rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ Style/AndOr:
- 'features/step_definitions/common_steps.rb'
- 'features/step_definitions/file_management_steps.rb'
- 'features/step_definitions/retail_steps.rb'
- 'features/step_definitions/salt_steps.rb'
- 'features/step_definitions/setup_steps.rb'

# Offense count: 1
Expand Down
10 changes: 0 additions & 10 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,6 @@
raise 'Vendor change option not found in logs' unless return_code.zero?
end

When(/^I apply highstate on "([^"]*)"$/) do |host|
system_name = get_system_name(host)
if host.include? 'ssh_minion'
cmd = 'mgr-salt-ssh'
elsif host.include? 'minion' or host.include? 'build'
cmd = 'salt'
end
get_target('server').run_until_ok("#{cmd} #{system_name} state.highstate")
end

When(/^I wait until "([^"]*)" service is active on "([^"]*)"$/) do |service, host|
node = get_target(host)
cmd = "systemctl is-active #{service}"
Expand Down
11 changes: 11 additions & 0 deletions testsuite/features/step_definitions/salt_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -578,3 +578,14 @@ def pillar_get(key, minion)
cleanup = %(salt #{system_name} state.apply util.mgr_switch_to_venv_minion pillar='{"mgr_purge_non_venv_salt_files": True, "mgr_purge_non_venv_salt": True}')
get_target('server').run(cleanup, check_errors: true, verbose: true)
end

When(/^I apply highstate on "([^"]*)"$/) do |host|
system_name = get_system_name(host)
if host.include? 'ssh_minion'
cmd = 'mgr-salt-ssh'
elsif host.include? 'minion' or host.include? 'build' or host.include? 'proxy'
cmd = 'salt'
end
log "#{cmd} #{system_name} state.highstate"
get_target('server').run_until_ok("#{cmd} #{system_name} state.highstate")
end

0 comments on commit 693e63a

Please sign in to comment.