style(test): improve Ruby style

This commit is contained in:
Nicolas Rodriguez 2020-08-24 17:34:56 +02:00
parent 6010cc32b8
commit 461ce4ffcd

View File

@ -1,23 +1,24 @@
# frozen_string_literal: true # frozen_string_literal: true
case platform[:family]
when 'redhat'
packages = %w[
prometheus2
alertmanager
node_exporter
]
when 'debian'
packages = %w[
prometheus
prometheus-alertmanager
prometheus-node-exporter
]
end
control 'prometheus packages' do control 'prometheus packages' do
title 'should be installed' title 'should be installed'
packages =
case platform[:family]
when 'redhat'
%w[
prometheus2
alertmanager
node_exporter
]
when 'debian'
%w[
prometheus
prometheus-alertmanager
prometheus-node-exporter
]
end
packages.each do |p| packages.each do |p|
describe package(p) do describe package(p) do
it { should be_installed } it { should be_installed }