forked from voxpupuli/puppet-prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add acceptance test for statsd_exporter
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'prometheus statsd exporter' do | ||
it 'statsd_exporter works idempotently with no errors' do | ||
pp = 'include prometheus::statsd_exporter' | ||
# Run it twice and test for idempotency | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe 'prometheus statsd exporter version 0.5.0' do | ||
it ' statsd_exporter installs with version 0.5.0' do | ||
pp = "class {'prometheus::statsd_exporter': version => '0.5.0' }" | ||
# Run it twice and test for idempotency | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
describe process('statsd_exporter') do | ||
its(:args) { is_expected.to match %r{\ -statsd.mapping-config} } | ||
end | ||
describe service('statsd_exporter') do | ||
it { is_expected.to be_running } | ||
it { is_expected.to be_enabled } | ||
end | ||
describe port(9102) do | ||
it { is_expected.to be_listening.with('tcp6') } | ||
end | ||
describe port(9125) do | ||
it { is_expected.to be_listening.with('udp6') } | ||
end | ||
end | ||
|
||
describe 'prometheus statsd exporter version 0.7.0' do | ||
it ' statsd_exporter installs with version 0.7.0' do | ||
pp = "class {'prometheus::statsd_exporter': version => '0.7.0' }" | ||
# Run it twice and test for idempotency | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
describe process('statsd_exporter') do | ||
its(:args) { is_expected.to match %r{\ --statsd.mapping-config} } | ||
end | ||
describe service('statsd_exporter') do | ||
it { is_expected.to be_running } | ||
it { is_expected.to be_enabled } | ||
end | ||
describe port(9102) do | ||
it { is_expected.to be_listening.with('tcp6') } | ||
end | ||
describe port(9125) do | ||
it { is_expected.to be_listening.with('udp6') } | ||
end | ||
end | ||
end |