Skip to content

Commit

Permalink
Specify option for with or without flushing When I create the bootstr…
Browse files Browse the repository at this point in the history
…ap repositories
  • Loading branch information
szachovy authored and admd committed Jun 19, 2024
1 parent 8805b4e commit bb06a2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ Feature: Create bootstrap repositories

@sle15sp5s390_minion
Scenario: Create the bootstrap repository for a SLES 15 SP5 s390x minion
When I create the bootstrap repository for "sle15sp5s390_minion" on the server
When I create the bootstrap repository for "sle15sp5s390_minion" on the server without flushing
12 changes: 8 additions & 4 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1048,18 +1048,22 @@
end
end

When(/^I create the bootstrap repository for "([^"]*)" on the server$/) do |host|
When(/^I create the bootstrap repository for "([^"]*)" on the server((?: without flushing)?)$/) do |host, without_flushing|
base_channel = BASE_CHANNEL_BY_CLIENT[product][host]
channel = CHANNEL_LABEL_TO_SYNC_BY_BASE_CHANNEL[product][base_channel]
parent_channel = PARENT_CHANNEL_LABEL_TO_SYNC_BY_BASE_CHANNEL[product][base_channel]
get_target('server').wait_while_process_running('mgr-create-bootstrap-repo')

cmd =
if parent_channel.nil?
"mgr-create-bootstrap-repo --create #{channel} --with-custom-channels --flush"
"mgr-create-bootstrap-repo --create #{channel} --with-custom-channels"
else
"mgr-create-bootstrap-repo --create #{channel} --with-parent-channel #{parent_channel} --with-custom-channels --flush"
"mgr-create-bootstrap-repo --create #{channel} --with-parent-channel #{parent_channel} --with-custom-channels"
end
log 'Creating the boostrap repository on the server:'

cmd += ' --flush' unless without_flushing

log 'Creating the bootstrap repository on the server:'
log " #{cmd}"
get_target('server').run(cmd)
end
Expand Down

0 comments on commit bb06a2e

Please sign in to comment.