puppet-glance/spec/classes/glance_client_spec.rb
Gael Chamoulaud da26542fbb Fix unit tests against Puppet 4.3.0
Related-bug: #1517805
Change-Id: I19e891ecce2bceb20e141199e14333f01b0ec9ab
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-11-24 10:05:01 +01:00

34 lines
755 B
Ruby

require 'spec_helper'
describe 'glance::client' do
shared_examples 'glance client' do
it { is_expected.to contain_class('glance::params') }
it { is_expected.to contain_package('python-glanceclient').with(
:name => 'python-glanceclient',
:ensure => 'present',
:tag => ['openstack'],
)
}
end
context 'on Debian platforms' do
let :facts do
@default_facts.merge({
:osfamily => 'Debian',
})
end
include_examples 'glance client'
end
context 'on RedHat platforms' do
let :facts do
@default_facts.merge({
:osfamily => 'RedHat',
:operatingsystemrelease => '7',
})
end
include_examples 'glance client'
end
end