ecbc2d97bf6d520e6d97561bb802e057c8809def
[mirror/dsa-puppet.git] / 3rdparty / modules / cinder / spec / classes / cinder_quota_spec.rb
1 require 'spec_helper'
2
3 describe 'cinder::quota' do
4
5   describe 'with default parameters' do
6     it 'contains default values' do
7       should contain_cinder_config('DEFAULT/quota_volumes').with(
8         :value => 10)
9       should contain_cinder_config('DEFAULT/quota_snapshots').with(
10         :value => 10)
11       should contain_cinder_config('DEFAULT/quota_gigabytes').with(
12         :value => 1000)
13       should contain_cinder_config('DEFAULT/quota_driver').with(
14         :value => 'cinder.quota.DbQuotaDriver')
15     end
16   end
17
18   describe 'with overridden parameters' do
19     let :params do
20       { :quota_volumes => 1000,
21         :quota_snapshots => 1000,
22         :quota_gigabytes => 100000 }
23     end
24     it 'contains overrided values' do
25       should contain_cinder_config('DEFAULT/quota_volumes').with(
26         :value => 1000)
27       should contain_cinder_config('DEFAULT/quota_snapshots').with(
28         :value => 1000)
29       should contain_cinder_config('DEFAULT/quota_gigabytes').with(
30         :value => 100000)
31       should contain_cinder_config('DEFAULT/quota_driver').with(
32         :value => 'cinder.quota.DbQuotaDriver')
33     end
34   end
35 end