-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #19063 - uploads packages with correct name #6813
Conversation
@@ -850,6 +850,37 @@ def test_import_uploads | |||
assert_response :success | |||
end | |||
|
|||
def test_import_uploads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method Katello::Api::V2::RepositoriesControllerTest#test_import_uploads is defined at both test/controllers/api/v2/repositories_controller_test.rb:840 and test/controllers/api/v2/repositories_controller_test.rb:853.
upload.except('id').except('name') | ||
else | ||
upload.except('id') | ||
end | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank line detected.
@@ -365,13 +366,14 @@ def import_uploads | |||
|
|||
upload_ids = uploads.map { |upload| upload['id'] } | |||
unit_keys = uploads.map do |upload| | |||
if @repository.file? | |||
unless @repository.file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use unless with else. Rewrite these with the positive case first.
dc51ecc
to
e463548
Compare
This commit fixes an issue with the package uploads The prior logic includes the package name for yum repos while excludes the name for file repos. What we intend to happen is the reverse. We need to include the name for file but exclude for yum since the name is derived from the metadata for yum, puppet and other types. This commit also contains a couple of unit tests to handle this.
package uploaded with on master
on PR branch
The name is corrected by this change 👍 |
This commit fixes an issue with the package uploads
The prior logic includes the package name for yum repos
while excludes the name for file repos. What we intend to
happen is the reverse. We need to include the name for file
but exclude for yum since the name is derived from the metadata
for yum, puppet and other types.
This commit also contains a couple of unit tests to handle this.