Skip to content

Commit 1e9be33

Browse files
committed
Add specs for physical_volume
1 parent 2d1077b commit 1e9be33

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/unit/type/logical_volume_spec.rb

+13
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@
185185
}.not_to raise_error
186186
end
187187

188+
it 'raises an ArgumentError when the physical volume is neither string nor array' do
189+
expect {
190+
resource = Puppet::Type.type(:logical_volume).new(
191+
name: 'john',
192+
ensure: :present,
193+
volume_group: 'ernie',
194+
size: '10M',
195+
physical_volume: 42,
196+
)
197+
}.to raise_error(Puppet::ResourceError,
198+
'physical_volume should be String or Array: 42')
199+
end
200+
188201
it 'invalid number of stripes raises error' do
189202
expect {
190203
resource = Puppet::Type.type(:logical_volume).new(

0 commit comments

Comments
 (0)