Skip to content

Commit

Permalink
Add specs for physical_volume
Browse files Browse the repository at this point in the history
  • Loading branch information
Elbandi committed Dec 26, 2024
1 parent 2d1077b commit 1e9be33
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/unit/type/logical_volume_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,19 @@
}.not_to raise_error
end

it 'raises an ArgumentError when the physical volume is neither string nor array' do
expect {
resource = Puppet::Type.type(:logical_volume).new(
name: 'john',
ensure: :present,
volume_group: 'ernie',
size: '10M',
physical_volume: 42,
)
}.to raise_error(Puppet::ResourceError,
'physical_volume should be String or Array: 42')
end

it 'invalid number of stripes raises error' do
expect {
resource = Puppet::Type.type(:logical_volume).new(
Expand Down

0 comments on commit 1e9be33

Please sign in to comment.