|
23 | 23 | end |
24 | 24 |
|
25 | 25 |
|
| 26 | + context "#{os} with ensure => absent" do |
| 27 | + let(:params) { {:ensure => 'absent', :object_type => 'foo', :target => '/bar/baz', :order => '10'} } |
| 28 | + |
| 29 | + it { is_expected.to contain_concat('/bar/baz') } |
| 30 | + |
| 31 | + it { is_expected.not_to contain_concat__fragment('icinga2::object::foo::bar') } |
| 32 | + end |
| 33 | + |
| 34 | + |
| 35 | + context "#{os} with ensure => foo (not a valid value)" do |
| 36 | + let(:params) { {:ensure => 'foo', :object_type => 'foo', :target => '/bar/baz', :order => '10'} } |
| 37 | + |
| 38 | + it { is_expected.to raise_error(Puppet::Error, /foo isn't supported/) } |
| 39 | + end |
| 40 | + |
| 41 | + |
26 | 42 | context "#{os} with object_type => 4247 (not valid string)" do |
27 | 43 | let(:params) { {:object_type => 4247, :target => '/bar/baz', :order => '10'} } |
28 | 44 |
|
|
102 | 118 | end |
103 | 119 |
|
104 | 120 |
|
| 121 | + context "Windows 2012 R2 with ensure => absent" do |
| 122 | + let(:facts) { { |
| 123 | + :kernel => 'Windows', |
| 124 | + :architecture => 'x86_64', |
| 125 | + :osfamily => 'Windows', |
| 126 | + :operatingsystem => 'Windows', |
| 127 | + :operatingsystemmajrelease => '2012 R2' |
| 128 | + } } |
| 129 | + let(:params) { {:ensure => 'absent', :object_type => 'foo', :target => 'C:/bar/baz', :order => '10'} } |
| 130 | + |
| 131 | + it { is_expected.to contain_concat('C:/bar/baz') } |
| 132 | + |
| 133 | + it { is_expected.not_to contain_concat__fragment('icinga2::object::foo::bar') } |
| 134 | + end |
| 135 | + |
| 136 | + |
| 137 | + context "Windows 2012 R2 with ensure => foo (not a valid value)" do |
| 138 | + let(:facts) { { |
| 139 | + :kernel => 'Windows', |
| 140 | + :architecture => 'x86_64', |
| 141 | + :osfamily => 'Windows', |
| 142 | + :operatingsystem => 'Windows', |
| 143 | + :operatingsystemmajrelease => '2012 R2' |
| 144 | + } } |
| 145 | + let(:params) { {:ensure => 'foo', :object_type => 'foo', :target => 'C:/bar/baz', :order => '10'} } |
| 146 | + |
| 147 | + it { is_expected.to raise_error(Puppet::Error, /foo isn't supported/) } |
| 148 | + end |
| 149 | + |
| 150 | + |
105 | 151 | context "Windows 2012 R2 with object_type => 4247 (not valid string)" do |
106 | 152 | let(:facts) { { |
107 | 153 | :kernel => 'Windows', |
|
0 commit comments