-
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 #31247 - deleting wrong repo reference on cv delete #9038
Conversation
Issues: #31247 |
assert repo_reference | ||
assert Katello::Pulp3::Api::File.new(@primary).repositories_api.read(repo_reference.repository_href) | ||
|
||
ForemanTasks.sync_task(::Actions::Pulp3::ContentView::DeleteRepositoryReferences, @content_view, @primary) | ||
refute Katello::Pulp3::RepositoryReference.find_by(:id => repo_reference.id) | ||
|
||
assert Katello::Pulp3::RepositoryReference.find_by(:id => library_repo_ref.id) |
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.
note that this test reproduces the error on master
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.
This needs an update to get the tests passing: https://github.com/Katello/katello/blob/master/test/support/pulp3_support.rb#L22
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.
It's working fine for me. I'll ACK once the tests pass.
Rubocop error and a VCR issue is remaining. Other issues are the exporter failures. |
previously the wrong repo reference object was deleted
@@ -23,16 +23,14 @@ def test_list_with_pagination | |||
User.current = users(:admin) | |||
@primary = FactoryBot.create(:smart_proxy, :default_smart_proxy, :with_pulp3) | |||
|
|||
repo1 = katello_repositories(:pulp3_file_1) | |||
repo1 = katello_repositories(:generic_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.
This test wasn't really written properly, notice its creating the same repo in pulp3 twice.
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.
Looks good to me!
previously the wrong repo reference object was deleted