Skip to content

Commit

Permalink
Fixes #18076 - Can set OSTree repo depth
Browse files Browse the repository at this point in the history
Enables one to set the importer depth value for the ostree repo.
look at http://projects.theforeman.org/issues/18076 for more info.
  • Loading branch information
parthaa committed Feb 1, 2017
1 parent 05e29c8 commit f10a85f
Show file tree
Hide file tree
Showing 13 changed files with 2,032 additions and 346 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@

Exposing Pulp's juiciest parts. http://www.pulpproject.org/

Latest Live Tested Version: **pulp-server-2.8.3-0.1.beta.el7.noarch**
Latest Live Tested Version: **pulp-server-2.11.0-1.el7.noarch**

Current stable Runcible: https://github.com/Katello/runcible/tree/0.3

Expand Down
2 changes: 1 addition & 1 deletion lib/runcible/models/ostree_importer.rb
Expand Up @@ -4,7 +4,7 @@ class OstreeImporter < Importer
ID = 'ostree_web_importer'.freeze
REPO_TYPE = 'OSTREE'.freeze

attr_accessor 'branches'
attr_accessor 'branches', 'depth'

def id
OstreeImporter::ID
Expand Down
1 change: 1 addition & 0 deletions runcible.gemspec
Expand Up @@ -20,6 +20,7 @@ Gem::Specification.new do |gem|
gem.add_dependency('oauth')
gem.add_dependency('activesupport', '>= 3.0.10')
gem.add_dependency('i18n', '>= 0.5.0')
gem.add_dependency('pry-byebug')

gem.add_development_dependency('yard')
gem.add_development_dependency('maruku')
Expand Down
3 changes: 3 additions & 0 deletions test/extensions/ostree_repository_test.rb
Expand Up @@ -85,12 +85,15 @@ def test_create_with_importer_and_distributors
def test_create_with_importer_and_distributors_objects
distributors = [Runcible::Models::OstreeDistributor.new(:id => '123')]
importer = Runcible::Models::OstreeImporter.new
depth = -1
importer.depth = depth
response = @extension.create_with_importer_and_distributors(RepositorySupport.repo_id, importer, distributors)
assert_equal 201, response.code

response = @extension.retrieve(RepositorySupport.repo_id, :details => true)
assert_equal RepositorySupport.repo_id, response['id']
assert_equal 'ostree_web_importer', response['importers'].first['importer_type_id']
assert_equal depth, response['importers'].first['config']['depth']
end
end

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f10a85f

Please sign in to comment.