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 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' )
You can’t perform that action at this time.
0 commit comments