Skip to content

Commit

Permalink
fixup! Fixes #38009 - content-override with deselect
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bucher committed Nov 15, 2024
1 parent 616d033 commit 5fc8308
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@ def test_find_content_overrides_with_empty_string_search_limited_to_environment
end

def test_find_content_overrides_with_inverse_search_limited_to_environment_with_structured_apt
# enable structured_apt
Foreman.settings.set_user_value('deb_enable_structured_apt', true)
# Create Host with "deb" as content
content_view = katello_content_views(:library_dev_view)
library = katello_environments(:library)
Expand All @@ -286,14 +284,9 @@ def test_find_content_overrides_with_inverse_search_limited_to_environment_with_
host = FactoryBot.create(:host, :with_content, :with_subscription, :content_view => content_view,
:lifecycle_environment => library, :organization => content_view.organization)

# Get content_id and label of first product of host
products = ::Katello::Content.joins(:product_contents)
.where("#{Katello::ProductContent.table_name}.product_id": host.organization.products.subscribable.enabled)
in_env_id = products.pluck(:content_id)[2]

# Create fake product with content_id and stub ProductContentFinder
content = katello_contents(:deb_content_v1)
pc = [FactoryBot.build(:katello_product_content, content: content, content_id: in_env_id)]
pc = [FactoryBot.build(:katello_product_content, content: content)]
ProductContentFinder.any_instance.stubs(:product_content).returns(pc)

controller = ::Katello::Api::V2::HostSubscriptionsController.new
Expand Down

0 comments on commit 5fc8308

Please sign in to comment.