2019-06-16 02:33:24 +02:00
|
|
|
control 'prometheus configuration environment' do
|
2019-06-16 02:22:14 +02:00
|
|
|
title 'should match desired lines'
|
|
|
|
|
2019-10-04 12:13:24 +02:00
|
|
|
args_file = case os[:family]
|
|
|
|
when 'debian'
|
|
|
|
'/etc/default/prometheus'
|
|
|
|
else
|
|
|
|
'/etc/default/prometheus.sh'
|
|
|
|
end
|
|
|
|
|
|
|
|
describe file(args_file) do
|
2019-06-16 02:22:14 +02:00
|
|
|
it { should be_file }
|
|
|
|
it { should be_owned_by 'root' }
|
|
|
|
it { should be_grouped_into 'root' }
|
|
|
|
its('mode') { should cmp '0644' }
|
2019-06-23 18:18:40 +02:00
|
|
|
its('content') { should include '--web.listen-address=0.0.0.0:9090' }
|
2019-06-16 02:22:14 +02:00
|
|
|
end
|
|
|
|
end
|