|
12 | 12 | :size_is_minsize => :false, |
13 | 13 | :persistent => :false, |
14 | 14 | :minor => 100, |
| 15 | + :thinpool => false, |
| 16 | + :poolmetadatasize => '10M', |
15 | 17 | } |
16 | 18 | stub_default_provider! |
17 | 19 | end |
|
47 | 49 | end |
48 | 50 | end |
49 | 51 |
|
| 52 | + |
50 | 53 | describe "when specifying the 'size_is_minsize' parameter" do |
51 | 54 | it "should exist" do |
52 | 55 | @type.attrclass(:size_is_minsize).should_not be_nil |
|
90 | 93 |
|
91 | 94 | end |
92 | 95 |
|
| 96 | + describe "when specifying the 'thinpool' parameter" do |
| 97 | + it "should exist" do |
| 98 | + @type.attrclass(:thinpool).should_not be_nil |
| 99 | + end |
| 100 | + it 'should support setting a value' do |
| 101 | + with(valid_params)[:thinpool].should == valid_params[:thinpool] |
| 102 | + end |
| 103 | + it "should support 'true' as a value" do |
| 104 | + with(valid_params.merge(:thinpool => :true)) do |resource| |
| 105 | + resource[:thinpool].should == true |
| 106 | + end |
| 107 | + end |
| 108 | + it "should support 'false' as a value" do |
| 109 | + with(valid_params.merge(:thinpool => :false)) do |resource| |
| 110 | + resource[:thinpool].should == false |
| 111 | + end |
| 112 | + end |
| 113 | + it "should not support other values" do |
| 114 | + specifying(valid_params.merge(:thinpool => :moep)).should raise_error(Puppet::Error) |
| 115 | + end |
| 116 | + end |
| 117 | + |
| 118 | + describe "when specifying the 'poolmetadatasize' parameter" do |
| 119 | + it "should exist" do |
| 120 | + @type.attrclass(:poolmetadatasize).should_not be_nil |
| 121 | + end |
| 122 | + it 'should support setting a value' do |
| 123 | + with(valid_params)[:poolmetadatasize].should == valid_params[:poolmetadatasize] |
| 124 | + end |
| 125 | + |
| 126 | + it 'should support K, M, G, T, P and E as extensions' do |
| 127 | + ['K', 'M', 'G', 'T', 'P', 'E'].each do |ext| |
| 128 | + with(valid_params.merge(:poolmetadatasize => "10#{ext}")) do |resource| |
| 129 | + resource[:poolmetadatasize].should == "10#{ext}" |
| 130 | + end |
| 131 | + end |
| 132 | + end |
| 133 | + |
| 134 | + it "should not support other values" do |
| 135 | + specifying(valid_params.merge(:poolmetadatasize => "100X")).should raise_error(Puppet::Error) |
| 136 | + end |
| 137 | + end |
| 138 | + |
93 | 139 | describe "when specifying the 'extents' parameter" do |
94 | 140 | it "should exist" do |
95 | 141 | @type.attrclass(:extents).should_not be_nil |
|
0 commit comments