Fix unit tests

The unit tests were broken by a change to openstacklib
Id09c3358c5843510e6a2a8c0e2d4aeb3607e098b which renamed some of the
resources in the openstacklib classes. The problem is that our tests in
this module should not have been testing what occurs within the modules
so this fix updates the tests to only check what we are doing within
this module.

Depends-On: I9d535ab38afea852559df2b3073bd4b74a2a3947
Change-Id: I96d6f822665b06265fe685554c275512f480de37
This commit is contained in:
ZhongShengping 2017-07-14 10:28:53 +08:00
parent 0adfc3d495
commit 302415b5c2
1 changed files with 6 additions and 18 deletions

View File

@ -364,17 +364,11 @@ describe 'glance::api' do
:validate => true,
})
end
it { is_expected.to contain_exec('execute glance-api validation').with(
:path => '/usr/bin:/bin:/usr/sbin:/sbin',
:provider => 'shell',
:tries => '10',
:try_sleep => '2',
:command => 'glance --os-auth-url http://127.0.0.1:5000 --os-project-name services --os-username glance --os-password ChangeMe image-list',
it { is_expected.to contain_openstacklib__service_validation('glance-api').with(
:command => 'glance --os-auth-url http://127.0.0.1:5000 --os-project-name services --os-username glance --os-password ChangeMe image-list',
:subscribe => 'Service[glance-api]',
)}
it { is_expected.to contain_anchor('create glance-api anchor').with(
:require => 'Exec[execute glance-api validation]',
)}
end
describe 'Support IPv6' do
@ -395,17 +389,11 @@ describe 'glance::api' do
:validation_options => { 'glance-api' => { 'command' => 'my-script' } }
})
end
it { is_expected.to contain_exec('execute glance-api validation').with(
:path => '/usr/bin:/bin:/usr/sbin:/sbin',
:provider => 'shell',
:tries => '10',
:try_sleep => '2',
:command => 'my-script',
it { is_expected.to contain_openstacklib__service_validation('glance-api').with(
:command => 'my-script',
:subscribe => 'Service[glance-api]',
)}
it { is_expected.to contain_anchor('create glance-api anchor').with(
:require => 'Exec[execute glance-api validation]',
)}
end
end