diff --git a/manifests/storage/xfs.pp b/manifests/storage/xfs.pp index 8e867b92..084e2575 100644 --- a/manifests/storage/xfs.pp +++ b/manifests/storage/xfs.pp @@ -50,7 +50,7 @@ define swift::storage::xfs( } swift::storage::mount { $name: - device => "/dev/${name}", + device => $target_device, mnt_base_dir => $mnt_base_dir, subscribe => Exec["mkfs-${name}"], loopback => $loopback, diff --git a/spec/defines/swift_storage_xfs_spec.rb b/spec/defines/swift_storage_xfs_spec.rb index 55af579b..8d254984 100644 --- a/spec/defines/swift_storage_xfs_spec.rb +++ b/spec/defines/swift_storage_xfs_spec.rb @@ -7,14 +7,14 @@ describe 'swift::storage::xfs' do describe 'when a device is specified' do let :default_params do { - :device => 'some_device', + :device => "/dev/#{title}", :byte_size => '1024', :mnt_base_dir => '/srv/node', :loopback => false } end - [{:device => 'some_device'}, + [{}, { :device => 'some_device', :byte_size => 1, @@ -38,8 +38,8 @@ describe 'swift::storage::xfs' do :require => 'Package[xfsprogs]' )} - it { should contain_swift__storage__mount('foo').with( - :device => '/dev/foo', + it { should contain_swift__storage__mount(title).with( + :device => param_hash[:device], :mnt_base_dir => param_hash[:mnt_base_dir], :loopback => param_hash[:loopback], :subscribe => 'Exec[mkfs-foo]'