Files
puppet-openstack/spec/classes/openstack_repo_spec.rb
Adam Compton 190e3e0ea7 Adding an "openstack::repo" class which automatically sets up repos
Tested with the following combinations:

- RHEL-alikes, OpenStack Folsom
- RHEL-alikes, OpenStack Grizzly
- Fedora 18, OpenStack Grizzly (F18 includes folsom)
- Ubuntu 12.04+, OpenStack Folsom
- Ubuntu 12.04+, OpenStack Grizzly

Change-Id: I737da83d138695a178aaf3fa711a6e08a678adde
2013-06-11 20:49:38 -07:00

69 lines
1.7 KiB
Ruby

require 'spec_helper'
describe 'openstack::repo' do
describe 'RHEL and grizzly' do
let :params do
{ :release => 'grizzly' }
end
let :facts do
{
:osfamily => 'RedHat',
:operatingsystem => 'CentOS',
:operatingsystemrelease => '6.4',
}
end
it do
should contain_yumrepo('rdo-release').with(
:baseurl => 'http://repos.fedorapeople.org/repos/openstack/openstack-grizzly/epel-6/'
)
should contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-Grizzly')
should contain_yumrepo('epel')
should contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6')
end
end
describe 'Fedora and grizzly' do
let :params do
{ :release => 'grizzly' }
end
let :facts do
{
:osfamily => 'RedHat',
:operatingsystem => 'Fedora',
:operatingsystemrelease => '18',
}
end
it do
should contain_yumrepo('rdo-release').with(
:baseurl => 'http://repos.fedorapeople.org/repos/openstack/openstack-grizzly/fedora-18/'
)
should contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-Grizzly')
end
end
describe 'Ubuntu and grizzly' do
let :params do
{ :release => 'grizzly' }
end
let :facts do
{
:osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
:operatingsystemrelease => '12.04',
:lsbdistdescription => 'Ubuntu 12.04.1 LTS',
:lsbdistcodename => 'precise',
}
end
it do
should contain_apt__source('ubuntu-cloud-archive').with_release('precise-updates/grizzly')
end
end
end