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 control 'prometheus services' do
title 'should be running' 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_enabled }
it { should be_running } it { should be_running }
end end

View File

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