File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 188188 it { is_expected . to contain_file ( conf_file ) . without_content ( %r{hostname_extraction_regex:} ) }
189189 end
190190 end
191+
192+ context 'disabled ruby-manage' do
193+ let ( :params ) do
194+ {
195+ api_key : 'notanapikey' ,
196+ hostname_extraction_regex : nil ,
197+ dogapi_version : 'installed' ,
198+ puppetmaster_user : 'puppet' ,
199+ puppet_gem_provider : 'gem' ,
200+ manage_ruby : false ,
201+ }
202+ end
203+
204+ describe 'datadog_agent class dogapi version override' do
205+ let ( :facts ) do
206+ {
207+ operatingsystem : 'Debian' ,
208+ osfamily : 'debian' ,
209+ }
210+ end
211+
212+ it { is_expected . not_to contain_class ( 'ruby' ) . with_rubygems_update ( false ) }
213+ it { is_expected . not_to contain_class ( 'ruby::params' ) }
214+ it { is_expected . not_to contain_package ( 'ruby' ) . with_ensure ( 'installed' ) }
215+ it { is_expected . not_to contain_package ( 'rubygems' ) . with_ensure ( 'installed' ) }
216+
217+ it { is_expected . not_to contain_package ( 'ruby-dev' ) }
218+
219+ it { is_expected . not_to contain_package ( 'dogapi' ) }
220+
221+ it do
222+ is_expected . to contain_file ( '/etc/datadog-agent/datadog-reports.yaml' ) \
223+ . with_owner ( 'puppet' ) \
224+ . with_group ( 'root' )
225+ end
226+ end
227+ end
191228end
You can’t perform that action at this time.
0 commit comments