Skip to content

Commit

Permalink
Refs #35505 - ISS Syncable imports (#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
parthaa authored Sep 21, 2022
1 parent 6a47ac3 commit 8fb71dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/hammer_cli_katello/content_export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def execute
end

make_listing_files(export_history)

output.print_message _("Generated #{export_history['path']}")
HammerCLI::EX_OK
end
end
Expand Down
9 changes: 3 additions & 6 deletions lib/hammer_cli_katello/content_export_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ def execute
response
else
export_history = fetch_export_history_from_task(reload_task(@task))
if syncable?
make_listing_files(export_history)
HammerCLI::EX_OK
elsif export_history

if export_history
make_listing_files(export_history) if syncable?
generate_metadata_json(export_history)
HammerCLI::EX_OK
else
Expand Down Expand Up @@ -82,8 +81,6 @@ def check_export_history_syncable!(export_history)

def make_listing_files(export_history)
check_export_history_syncable!(export_history)
output.print_message _("Generated #{export_history['path']}")

return unless Dir.exist?("#{export_history['path']}/content")

begin
Expand Down
1 change: 1 addition & 0 deletions test/data/4.7/foreman_api.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require 'mocha/minitest'
require 'hammer_cli'

KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '4.6')
KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '4.7')

if HammerCLI.context[:api_connection]
HammerCLI.context[:api_connection].create('foreman') do
Expand Down

0 comments on commit 8fb71dd

Please sign in to comment.