@@ -27,7 +27,7 @@ define swift::storage::xfs(
|
|||||||
|
|
||||||
swift::storage::mount { $name:
|
swift::storage::mount { $name:
|
||||||
device => $device,
|
device => $device,
|
||||||
mnt_base_dir => $mount_base_dir,
|
mnt_base_dir => $mnt_base_dir,
|
||||||
subscribe => Exec["mkfs-${name}"]
|
subscribe => Exec["mkfs-${name}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,12 +18,13 @@ describe 'swift::storage::xfs' do
|
|||||||
:mnt_base_dir => '/srv/node'}
|
:mnt_base_dir => '/srv/node'}
|
||||||
end
|
end
|
||||||
|
|
||||||
[{},
|
[{:device => 'some_device'},
|
||||||
{:byte_size => 1,
|
{:device => 'some_device',
|
||||||
|
:byte_size => 1,
|
||||||
:mnt_base_dir => '/mnt/foo'}
|
:mnt_base_dir => '/mnt/foo'}
|
||||||
].each do |param_set|
|
].each do |param_set|
|
||||||
|
|
||||||
describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do
|
describe "#{param_set == {} ? "using default" : "specifying"} class parameters" do
|
||||||
let :param_hash do
|
let :param_hash do
|
||||||
default_params.merge(param_set)
|
default_params.merge(param_set)
|
||||||
end
|
end
|
||||||
@@ -32,7 +33,7 @@ describe 'swift::storage::xfs' do
|
|||||||
param_set
|
param_set
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_exec("exec-foo").with(
|
it { should contain_exec("mkfs-foo").with(
|
||||||
:command => "mkfs.xfs -i size=#{param_hash[:byte_size]} #{param_hash[:device]}",
|
:command => "mkfs.xfs -i size=#{param_hash[:byte_size]} #{param_hash[:device]}",
|
||||||
:path => ['/sbin/'],
|
:path => ['/sbin/'],
|
||||||
:refreshonly => true,
|
:refreshonly => true,
|
||||||
@@ -42,7 +43,7 @@ describe 'swift::storage::xfs' do
|
|||||||
it { should contain_swift__storage__mount('foo').with(
|
it { should contain_swift__storage__mount('foo').with(
|
||||||
{:device => param_hash[:device],
|
{:device => param_hash[:device],
|
||||||
:mnt_base_dir => param_hash[:mnt_base_dir],
|
:mnt_base_dir => param_hash[:mnt_base_dir],
|
||||||
:subscribe => 'Exec[mkfs-foo']}
|
:subscribe => 'Exec[mkfs-foo]'}
|
||||||
)}
|
)}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user