Page MenuHomeSoftware Heritage

blackbox_exporter_spec.rb
No OneTemporary

blackbox_exporter_spec.rb

require 'spec_helper'
describe 'prometheus::blackbox_exporter' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts
end
context 'with version specified' do
let(:params) do
{
version: '0.6.0',
arch: 'amd64',
os: 'linux',
modules: {
'http_2xx' => {
'prober' => 'http'
}
}
}
end
describe 'with all defaults' do
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_file('/usr/local/bin/blackbox_exporter').with('target' => '/opt/blackbox_exporter-0.6.0.linux-amd64/blackbox_exporter') }
it { is_expected.to contain_prometheus__daemon('blackbox_exporter') }
it { is_expected.to contain_user('blackbox-exporter') }
it { is_expected.to contain_group('blackbox-exporter') }
it { is_expected.to contain_service('blackbox_exporter') }
it { is_expected.to contain_archive('/tmp/blackbox_exporter-0.6.0.tar.gz') }
it { is_expected.to contain_file('/opt/blackbox_exporter-0.6.0.linux-amd64/blackbox_exporter') }
it { is_expected.to contain_class('prometheus::params') }
it {
is_expected.to contain_file('/etc/blackbox-exporter.yaml')
verify_contents(catalogue, '/etc/blackbox-exporter.yaml', ['---', 'modules:', ' http_2xx:', ' prober: http'])
}
end
end
end
end
end

File Metadata

Mime Type
text/x-ruby
Expires
Thu, Jul 3, 11:09 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3295111

Event Timeline