Merge "add epel repo if adding rdo repo"
This commit is contained in:
@@ -18,3 +18,4 @@ end
|
|||||||
depends 'apt'
|
depends 'apt'
|
||||||
depends 'database'
|
depends 'database'
|
||||||
depends 'yum', '~> 3.0'
|
depends 'yum', '~> 3.0'
|
||||||
|
depends 'yum-epel'
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ when 'rhel'
|
|||||||
|
|
||||||
if node['openstack']['yum']['rdo_enabled']
|
if node['openstack']['yum']['rdo_enabled']
|
||||||
repo_action = :add
|
repo_action = :add
|
||||||
|
include_recipe 'yum-epel'
|
||||||
else
|
else
|
||||||
repo_action = :remove
|
repo_action = :remove
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ describe 'openstack-common::default' do
|
|||||||
repo_name = 'RDO-testrelease'
|
repo_name = 'RDO-testrelease'
|
||||||
expect(@chef_run).to add_yum_repository(repo_name)
|
expect(@chef_run).to add_yum_repository(repo_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'includes yum-epel recipe' do
|
||||||
|
expect(@chef_run).to include_recipe('yum-epel')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'rhel-no-rdo' do
|
describe 'rhel-no-rdo' do
|
||||||
@@ -28,5 +32,9 @@ describe 'openstack-common::default' do
|
|||||||
repo_name = 'RDO-testrelease'
|
repo_name = 'RDO-testrelease'
|
||||||
expect(@chef_run).to remove_yum_repository(repo_name)
|
expect(@chef_run).to remove_yum_repository(repo_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does not include yum-epel recipe' do
|
||||||
|
expect(@chef_run).to_not include_recipe('yum-epel')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user