Improve unit test coverage of gnocchi::storage::swift
Currently we only test swift_endpoint_type, but we should test all options to ensure all available options work. Change-Id: Iadb9a0d0a9c4b3dab70f34a87435df7a5c692a1e (cherry picked from commit7c3ec98728
) (cherry picked from commit2d33aa890a
)
This commit is contained in:
parent
53b48ba1f7
commit
f9fd67e25b
|
@ -26,14 +26,32 @@ describe 'gnocchi::storage::swift' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with swift_endpoint_type set' do
|
context 'with specific parameters' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
:swift_endpoint_type => 'internalURL'
|
:swift_user => 'swift2',
|
||||||
|
:swift_key => 'admin',
|
||||||
|
:swift_authurl => 'http://localhost:5000',
|
||||||
|
:swift_project_name => 'service',
|
||||||
|
:swift_user_domain_name => 'Default',
|
||||||
|
:swift_project_domain_name => 'Default',
|
||||||
|
:swift_region => 'regionOne',
|
||||||
|
:swift_auth_version => 2,
|
||||||
|
:swift_endpoint_type => 'publicURL',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures gnocchi-api with given endpoint type' do
|
it 'configures gnocchi-api with given endpoint type' do
|
||||||
is_expected.to contain_gnocchi_config('storage/swift_endpoint_type').with_value('internalURL')
|
is_expected.to contain_gnocchi_config('storage/driver').with_value('swift')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_user').with_value('swift2')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_key').with_value('admin')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_authurl').with_value('http://localhost:5000')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_project_name').with_value('service')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_user_domain_name').with_value('Default')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_project_domain_name').with_value('Default')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_region').with_value('regionOne')
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_auth_version').with_value(2)
|
||||||
|
is_expected.to contain_gnocchi_config('storage/swift_endpoint_type').with_value('publicURL')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue