Files
puppet-swift/spec/classes/swift_client_spec.rb
Adam Vinsh c659733d39 Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: I00cf4846bb933291469be94c9debed425eddf798
2016-05-25 08:52:47 -04:00

46 lines
841 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','swift-support-package'],
)
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