test(inspec): fix tests

This commit is contained in:
N 2019-06-23 17:18:40 +01:00
parent 1a890e5564
commit 4092fb4192
No known key found for this signature in database
GPG Key ID: 55A292EAB4E54067
3 changed files with 4 additions and 9 deletions

View File

@ -3,8 +3,8 @@ control 'Prometheus configuration' do
describe file('/etc/prometheus/prometheus.yml') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_owned_by 'prometheus' }
it { should be_grouped_into 'prometheus' }
its('mode') { should cmp '0644' }
its('content') { should include 'File managed by Salt' }
its('content') { should include 'Your changes may be overwritten.' }

View File

@ -6,7 +6,6 @@ control 'prometheus configuration environment' do
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
its('content') { should include 'Your changes may be overwritten' }
its('content') { should include 'export PATH=${PATH}:/opt/prometheus-2.10.0.linux-amd64' }
its('content') { should include '--web.listen-address=0.0.0.0:9090' }
end
end

View File

@ -4,11 +4,7 @@ control 'Prometheus service' do
describe service('prometheus') do
it { should be_enabled }
it { should be_running }
#it { should be_running } #some ubuntu 16.05 image issue
end
describe service('prometheus-node-exporter') do
it { should be_enabled }
it { should be_running }
end
end