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 34
34
@provider . class . stubs ( :lvs ) . with ( 'data' ) . returns ( lvs_output )
35
35
expect ( @provider . exists? ) . to be > 10
36
36
end
37
+ it "returns 'nil', lv 'swap' in vg 'VolGroup' exists" do
38
+ @resource . expects ( :[] ) . with ( :name ) . returns ( 'swap' )
39
+ @resource . expects ( :[] ) . with ( :volume_group ) . returns ( 'VolGroup' ) . at_least_once
40
+ @provider . class . stubs ( :lvs ) . with ( 'VolGroup' ) . returns ( lvs_output )
41
+ expect ( @provider . exists? ) . to be_nil
42
+ end
37
43
it "returns 'nil', lv 'data' in vg 'myvg' does not exist" do
38
44
@resource . expects ( :[] ) . with ( :volume_group ) . returns ( 'myvg' ) . at_least_once
39
45
@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