Include swift::params in swift::client

Otherwise swift::client can't fetch the name of the package by itself
if swift::params doesn't happen to be in the catalog.

Change-Id: I3d15d0ce68ca084eb4573764b05e8723befbd7e7
This commit is contained in:
David Moreau Simard 2014-05-28 17:28:27 -04:00
parent 29ade00640
commit 2c6261251c
2 changed files with 14 additions and 8 deletions

View File

@ -12,6 +12,8 @@ class swift::client (
$ensure = 'present'
) {
include swift::params
package { 'swiftclient':
ensure => $ensure,
name => $::swift::params::client_package,

View File

@ -1,16 +1,20 @@
require 'spec_helper'
describe 'swift::client' do
describe "with default parameters" do
it { should contain_package('swiftclient').with_ensure('present') }
it { should contain_package('swiftclient').with(
:ensure => 'present',
:name => 'python-swiftclient'
)}
let :facts do
{:osfamily => 'Debian'}
end
describe "with specified version" do
context 'with params' do
let :params do
{:ensure => '2.0.2-1'}
{:ensure => 'latest'}
end
it { should contain_package('swiftclient').with_ensure(params[:ensure]) }
it { should contain_package('swiftclient').with(
:ensure => 'latest',
:name => 'python-swiftclient'
)}
end
end