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 #36765 - add ability to export and import debian content #10749

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/katello/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Repository < Katello::Model
ANSIBLE_COLLECTION_TYPE = 'ansible_collection'.freeze
GENERIC_TYPE = 'generic'.freeze

EXPORTABLE_TYPES = [YUM_TYPE, FILE_TYPE, ANSIBLE_COLLECTION_TYPE, DOCKER_TYPE].freeze
EXPORTABLE_TYPES = [YUM_TYPE, FILE_TYPE, ANSIBLE_COLLECTION_TYPE, DOCKER_TYPE, DEB_TYPE].freeze

define_model_callbacks :sync, :only => :after

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def generate!
def generate_repository_metadata(repo)
repo.slice(:name, :label, :description, :arch, :content_type, :unprotected,
:checksum_type, :os_versions, :major, :minor,
:deb_releases, :deb_components, :deb_architectures,
:download_policy, :mirroring_policy).
merge(product: generate_product_metadata(repo.product),
gpg_key: generate_gpg_metadata(repo.gpg_key),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ def parse_repositories(repositories)
download_policy: repo[:download_policy],
mirroring_policy: repo[:mirroring_policy],
redhat: repo[:redhat],
deb_releases: repo[:deb_releases],
deb_components: repo[:deb_components],
deb_architectures: repo[:deb_architectures],
product: product_for_repo(repo),
gpg_key: gpg_key_for_repo(repo),
content: content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class ExportTest < ActiveSupport::TestCase
assert_includes export.repositories(fetch_all: true).all.map(&:content_type), 'ansible_collection'
assert_includes export.repositories(fetch_all: true).all.map(&:content_type), 'file'
assert_includes export.repositories(fetch_all: true).all.map(&:content_type), 'yum'
refute_includes export.repositories(fetch_all: true).all.map(&:content_type), 'deb'
assert_includes export.repositories(fetch_all: true).all.map(&:content_type), 'deb'
end

it "Generates Exporter path correctly" do
Expand Down
Loading