fix(test): fix tests for RedHat OSes in repo mode

This commit is contained in:
Nicolas Rodriguez 2020-08-24 23:33:16 +02:00
parent b03a1ccf04
commit 49e6fa5671
2 changed files with 15 additions and 2 deletions

View File

@ -3,7 +3,15 @@
control 'prometheus services' do
title 'should be running'
describe service('prometheus-node-exporter') do
service =
case platform[:family]
when 'redhat'
'node_exporter'
else
'prometheus-node-exporter'
end
describe service(service) do
it { should be_enabled }
it { should be_running }
end

View File

@ -80,18 +80,23 @@ prometheus:
slack_configs:
- channel: '#my-channel'
image_url: 'http://some.img.com/img.png'
{% if grains['os_family'] == 'Debian' %}
service:
name: prometheus-alertmanager
{% endif %}
node_exporter:
version: v0.18.1
archive:
source_hash: b2503fd932f85f4e5baf161268854bf5d22001869b84f00fd2d1f57b51b72424
service:
name: prometheus-node-exporter
args:
web.listen-address: ":9110"
# collector.textfile.directory: /var/tmp/node_exporter
{% if grains['os_family'] == 'Debian' %}
name: prometheus-node-exporter
{% endif %}
prometheus:
service: