Skip to content

Commit 4310ef4

Browse files
authored
Merge pull request #246 from rpluem/additional_test_for_244
Add a further test for #244
2 parents 69ab182 + a66aaa8 commit 4310ef4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/unit/puppet/provider/logical_volume/lvm_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
@provider.class.stubs(:lvs).with('vg_jenkins').returns(lvs_output)
4242
expect(@provider.exists?).to be_nil
4343
end
44+
it "returns 'nil', lv 'swap' in vg 'VolGroup' exists" do
45+
@resource.expects(:[]).with(:name).returns('swap')
46+
@resource.expects(:[]).with(:volume_group).returns('VolGroup').at_least_once
47+
@provider.class.stubs(:lvs).with('VolGroup').returns(lvs_output)
48+
expect(@provider.exists?).to be_nil
49+
end
4450
it "returns 'nil', lv 'data' in vg 'myvg' does not exist" do
4551
@resource.expects(:[]).with(:volume_group).returns('myvg').at_least_once
4652
@provider.class.stubs(:lvs).with('myvg').raises(Puppet::ExecutionFailure, 'Execution of \'/sbin/lvs myvg\' returned 5')

0 commit comments

Comments
 (0)