Skip to content
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

Merged
merged 1 commit into from
Nov 30, 2020

Conversation

jlsherrill
Copy link
Member

previously the wrong repo reference object was deleted

@theforeman-bot
Copy link

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)
Copy link
Member Author

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

Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@ianballou ianballou left a 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.

@ianballou
Copy link
Member

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)
Copy link
Member Author

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.

Copy link
Member

@ianballou ianballou left a 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!

@jlsherrill jlsherrill merged commit b4373c9 into Katello:master Nov 30, 2020
@jlsherrill jlsherrill deleted the 31247 branch November 30, 2020 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants