|
126 | 126 | } |
127 | 127 | end |
128 | 128 | end |
| 129 | + describe 'with parameter disable_auth' do |
| 130 | + context 'when set to true' do |
| 131 | + let(:params) {{ |
| 132 | + :disable_auth => true, |
| 133 | + }} |
| 134 | + |
| 135 | + it 'should contain disable auth setting' do |
| 136 | + should contain_file('/etc/ntp.conf').with({ |
| 137 | + 'content' => /^disable auth\n/, |
| 138 | + }) |
| 139 | + end |
| 140 | + end |
| 141 | + context 'when set to false' do |
| 142 | + let(:params) {{ |
| 143 | + :disable_auth => false, |
| 144 | + }} |
| 145 | + |
| 146 | + it 'should not contain disable auth setting' do |
| 147 | + should_not contain_file('/etc/ntp.conf').with({ |
| 148 | + 'content' => /^disable auth\n/, |
| 149 | + }) |
| 150 | + end |
| 151 | + end |
| 152 | + end |
| 153 | + describe 'with parameter broadcastclient' do |
| 154 | + context 'when set to true' do |
| 155 | + let(:params) {{ |
| 156 | + :broadcastclient => true, |
| 157 | + }} |
| 158 | + |
| 159 | + it 'should contain broadcastclient setting' do |
| 160 | + should contain_file('/etc/ntp.conf').with({ |
| 161 | + 'content' => /^broadcastclient\n/, |
| 162 | + }) |
| 163 | + end |
| 164 | + end |
| 165 | + context 'when set to false' do |
| 166 | + let(:params) {{ |
| 167 | + :broadcastclient => false, |
| 168 | + }} |
| 169 | + |
| 170 | + it 'should not contain broadcastclient setting' do |
| 171 | + should_not contain_file('/etc/ntp.conf').with({ |
| 172 | + 'content' => /^broadcastclient\n/, |
| 173 | + }) |
| 174 | + end |
| 175 | + end |
| 176 | + end |
129 | 177 |
|
130 | 178 | describe "ntp::install on #{system}" do |
131 | 179 | let(:params) {{ :package_ensure => 'present', :package_name => ['ntp'], :package_manage => true, }} |
|
0 commit comments