puppet-swift/spec/classes/swift_client_spec.rb
Gael Chamoulaud 9561ffffa2 Tag all Swift packages
Some users wish to override the default package provider by their own.

Tag all packages with the 'openstack' to allow mass resource attributes
override using resource collectors.

Change-Id: Ib0cec660f134e266006f41572cafcc4661ca1e67
Closes-bug: #1391209
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-04-07 20:00:41 +02:00

46 lines
814 B
Ruby

require 'spec_helper'
describe 'swift::client' do
let :params do
{}
end
let :default_params do
{ :package_ensure => 'present' }
end
shared_examples_for 'swift client' do
let :p do
default_params.merge(params)
end
it { is_expected.to contain_class('swift::params') }
it 'installs swift client package' do
is_expected.to contain_package('swiftclient').with(
:name => 'python-swiftclient',
:ensure => p[:package_ensure],
:tag => 'openstack'
)
end
end
context 'on Debian platform' do
let :facts do
{ :osfamily => 'Debian' }
end
it_configures 'swift client'
end
context 'on RedHat platform' do
let :facts do
{ :osfamily => 'RedHat' }
end
it_configures 'swift client'
end
end