
As the swift::disk patch added in puppet-swift, this patch update the openstack::swift::storage-node to support disk storage_type. Fix bug 1191339 Change-Id: I22e9b565b004ca9be5beb0a843dd4dfd4d29e552
52 lines
1.3 KiB
Ruby
52 lines
1.3 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'openstack::swift::storage-node' do
|
|
|
|
let :params do
|
|
{
|
|
:swift_zone => '1',
|
|
:storage_devices => '1',
|
|
}
|
|
end
|
|
|
|
let :facts do
|
|
{ :ipaddress_eth0 => '192.168.1.2' }
|
|
end
|
|
|
|
it 'should configure using the default values' do
|
|
should contain_class('swift').with(
|
|
:swift_hash_suffix => 'swift_secret',
|
|
:package_ensure => 'present',
|
|
)
|
|
should contain_define('swift::storage::loopback').with(
|
|
:base_dir => '/srv/loopback-device',
|
|
:mnt_base_dir => '/srv/node',
|
|
)
|
|
should contain_class('swift::storage::all').with(
|
|
:storage_local_net_ip => '192.168.1.2',
|
|
)
|
|
end
|
|
|
|
describe 'when setting up dsik for storage_type' do
|
|
before do
|
|
params.merge!(
|
|
:storage_type => 'disk',
|
|
:storage_devices => 'sda',
|
|
)
|
|
end
|
|
it 'should configure using the configured values' do
|
|
should contain_class('swift').with(
|
|
:swift_hash_suffix => 'swift_secret',
|
|
:package_ensure => 'present',
|
|
)
|
|
should contain_define('swift::storage::disk').with(
|
|
:mnt_base_dir => '/srv/node',
|
|
:byte_size => '1024',
|
|
)
|
|
should contain_class('swift::storage::all').with(
|
|
:storage_local_net_ip => '192.168.1.2',
|
|
)
|
|
end
|
|
|
|
end
|