2db61dcc98
... and use the service defaults instead. Current values are based on the old default values in trove but these were changed in trove some time ago[1]. [1] 9e3860d54cc0fea59e80b1705c02c78cca8e1953 Change-Id: If6ba170457ca11cbd0531ff8ea1e87346b43dcc2
51 lines
2.1 KiB
Ruby
51 lines
2.1 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'trove::quota' do
|
|
|
|
shared_examples_for 'trove::quota' do
|
|
context 'with default parameters' do
|
|
it 'contains default values' do
|
|
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with_value('<SERVICE DEFAULT>')
|
|
is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with_value('<SERVICE DEFAULT>')
|
|
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with_value('<SERVICE DEFAULT>')
|
|
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with_value('<SERVICE DEFAULT>')
|
|
is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with_value('<SERVICE DEFAULT>')
|
|
is_expected.to contain_trove_config('DEFAULT/quota_driver').with_value('<SERVICE DEFAULT>')
|
|
end
|
|
end
|
|
|
|
context 'with overridden parameters' do
|
|
let :params do
|
|
{ :max_instances_per_tenant => 10,
|
|
:max_ram_per_tenant => 10,
|
|
:max_accepted_volume_size => 10,
|
|
:max_volumes_per_tenant => 100,
|
|
:max_backups_per_tenant => 100,
|
|
:quota_driver => 'trove.quota.quota.DbQuotaDriver',
|
|
}
|
|
end
|
|
it 'contains overrided values' do
|
|
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with_value(10)
|
|
is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with_value(10)
|
|
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with_value(10)
|
|
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with_value(100)
|
|
is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with_value(100)
|
|
is_expected.to contain_trove_config('DEFAULT/quota_driver').with_value('trove.quota.quota.DbQuotaDriver')
|
|
end
|
|
end
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge!(OSDefaults.get_facts())
|
|
end
|
|
|
|
it_configures 'trove::quota'
|
|
end
|
|
end
|
|
|
|
end
|