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+ describe "datadog_agent class dogapi version override" do
204+ let ( :facts ) do
205+ {
206+ operatingsystem : 'Debian' ,
207+ osfamily : 'debian'
208+ }
209+ end
210+
211+ it { should_not contain_class ( 'ruby' ) . with_rubygems_update ( false ) }
212+ it { should_not contain_class ( 'ruby::params' ) }
213+ it { should_not contain_package ( 'ruby' ) . with_ensure ( 'installed' ) }
214+ it { should_not contain_package ( 'rubygems' ) . with_ensure ( 'installed' ) }
215+
216+ it { should_not contain_package ( 'ruby-dev' ) }
217+
218+ it { should_not contain_package ( 'dogapi' ) }
219+
220+ it do
221+ should contain_file ( '/etc/dd-agent/datadog.yaml' ) \
222+ . with_owner ( 'puppet' ) \
223+ . with_group ( 'root' )
224+ end
225+ end
226+ end
191227end
You can’t perform that action at this time.
0 commit comments