Skip to content

Commit

Permalink
CAT-1912 : Fixing specs
Browse files Browse the repository at this point in the history
  • Loading branch information
malikparvez committed Jul 9, 2024
1 parent 4216538 commit 7dc3aca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/puppet/provider/logical_volume/lvm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ def stripes
def stripes=(new_stripes_count)
current_stripes = stripes.to_i

# Changing stripes is not supported for existing logical volumes
return unless new_stripes_count.to_i != current_stripes
raise(Puppet::Error, "Changing stripes from #{current_stripes} to #{new_stripes_count} is not supported for existing logical volumes")
end
Expand Down
3 changes: 2 additions & 1 deletion spec/acceptance/create_filesystem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@
end

it 'change the stripes and re-applies the manifest' do
apply_manifest(pp1, { catch_failures: true, debug: true })
# It is expected to fail as number of stripes cannot be changed on a existing logical volume
apply_manifest(pp1, { expect_failures: true, debug: true })
remove_all(pv, vg, lv)
end
end
Expand Down

0 comments on commit 7dc3aca

Please sign in to comment.