Skip to content

Commit

Permalink
Fixes #16563 - Enables syncing atomic content from cdn
Browse files Browse the repository at this point in the history
Fixes include
1) Code to handle empty substitutions when enabling an atomic kickstart
2) Code to handle creation of the Red Hat Atomic host
3) Removed the Unnecessary seed script to create AH
  • Loading branch information
parthaa committed Sep 20, 2016
1 parent a2ed5e0 commit f17fdad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/controllers/katello/products_controller.rb
Expand Up @@ -72,7 +72,7 @@ def exclude_rolling_kickstart_repos(repos)
repos.select do |repo|
if repo[:path].include?('kickstart')
variants = ['Server', 'Client', 'ComputeNode', 'Workstation']
has_variant = variants.any? { |v| repo[:substitutions][:releasever].include?(v) }
has_variant = variants.any? { |v| repo[:substitutions][:releasever].try(:include?, v) }
has_variant ? repo[:enabled] : true
else
true
Expand Down
4 changes: 3 additions & 1 deletion app/models/katello/concerns/redhat_extensions.rb
Expand Up @@ -35,7 +35,9 @@ def create_operating_system(name, major, minor)
end

def construct_name(family)
if family.include? 'Red Hat'
if family == ::Operatingsystem::REDHAT_ATOMIC_HOST_DISTRO_NAME
return ::Operatingsystem::REDHAT_ATOMIC_HOST_OS
elsif family.include? 'Red Hat'
return 'RedHat'
else
return family.tr(' ', '_')
Expand Down
11 changes: 0 additions & 11 deletions db/seeds.d/109-atomic_os.rb

This file was deleted.

7 changes: 0 additions & 7 deletions test/lib/tasks/seeds_test.rb
Expand Up @@ -85,11 +85,4 @@ class EnsureSyncNotificationsTest < SeedsTest
seed
end
end

class AtomicOsTest < SeedsTest
test "Make sure atomic OS got setup" do
seed
assert Operatingsystem.find_by(:name => Operatingsystem::REDHAT_ATOMIC_HOST_OS).present?
end
end
end

0 comments on commit f17fdad

Please sign in to comment.