Fix spec tests for RSpec 3.x and Puppet 4.x

Remove value testing (we only check the key here), the value is nil or undef
and fix resource array, according[1].

[1]https://github.com/puppetlabs/puppet/blob/3.7.5/lib/puppet/resource.rb#L446-L453

Change-Id: Ic7a9b9d1e6d6b6b1c40fbce40d0bf9ff913f191e
Closes-bug: #1447620
This commit is contained in:
Sebastien Badia
2015-05-20 18:09:58 -07:00
parent 5e814f1b5f
commit 4a6e4cbb33
7 changed files with 23 additions and 17 deletions

View File

@@ -76,22 +76,22 @@ describe 'swift::ringbuilder' do
it 'should set up all of the correct dependencies' do
is_expected.to contain_swift__ringbuilder__create('object').with(
{:before => 'Ring_object_device[127.0.0.1:6000/1]'}
{:before => ['Ring_object_device[127.0.0.1:6000/1]']}
)
is_expected.to contain_swift__ringbuilder__create('container').with(
{:before => 'Ring_container_device[127.0.0.1:6001/1]'}
{:before => ['Ring_container_device[127.0.0.1:6001/1]']}
)
is_expected.to contain_swift__ringbuilder__create('account').with(
{:before => 'Ring_account_device[127.0.0.1:6002/1]'}
{:before => ['Ring_account_device[127.0.0.1:6002/1]']}
)
is_expected.to contain_ring_object_device('127.0.0.1:6000/1').with(
{:notify => 'Swift::Ringbuilder::Rebalance[object]'}
{:notify => ['Swift::Ringbuilder::Rebalance[object]']}
)
is_expected.to contain_ring_container_device('127.0.0.1:6001/1').with(
{:notify => 'Swift::Ringbuilder::Rebalance[container]'}
{:notify => ['Swift::Ringbuilder::Rebalance[container]']}
)
is_expected.to contain_ring_account_device('127.0.0.1:6002/1').with(
{:notify => 'Swift::Ringbuilder::Rebalance[account]'}
{:notify => ['Swift::Ringbuilder::Rebalance[account]']}
)
end
end