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
control 'prometheus packages' do
title 'should be installed'
packages =
case platform[:family] case platform[:family]
when 'redhat' when 'redhat'
packages = %w[ %w[
prometheus2 prometheus2
alertmanager alertmanager
node_exporter node_exporter
] ]
when 'debian' when 'debian'
packages = %w[ %w[
prometheus prometheus
prometheus-alertmanager prometheus-alertmanager
prometheus-node-exporter prometheus-node-exporter
] ]
end end
control 'prometheus packages' do
title 'should be installed'
packages.each do |p| packages.each do |p|
describe package(p) do describe package(p) do
it { should be_installed } it { should be_installed }