File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
spec/unit/puppet/provider/logical_volume Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 41
41
@provider . class . stubs ( :lvs ) . with ( 'vg_jenkins' ) . returns ( lvs_output )
42
42
expect ( @provider . exists? ) . to be_nil
43
43
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
44
50
it "returns 'nil', lv 'data' in vg 'myvg' does not exist" do
45
51
@resource . expects ( :[] ) . with ( :volume_group ) . returns ( 'myvg' ) . at_least_once
46
52
@provider . class . stubs ( :lvs ) . with ( 'myvg' ) . raises ( Puppet ::ExecutionFailure , 'Execution of \'/sbin/lvs myvg\' returned 5' )
You can’t perform that action at this time.
0 commit comments