Skip to content

Commit

Permalink
consul_exporter: Update 0.4.0->0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jul 19, 2019
1 parent d754df5 commit 538c846
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ prometheus::consul_exporter::log_level: 'info'
prometheus::consul_exporter::package_ensure: 'latest'
prometheus::consul_exporter::package_name: 'consul_exporter'
prometheus::consul_exporter::user: 'consul-exporter'
prometheus::consul_exporter::version: '0.4.0'
prometheus::consul_exporter::version: '0.5.0'
prometheus::consul_exporter::web_listen_address: ':9107'
prometheus::consul_exporter::web_telemetry_path: '/metrics'
prometheus::download_extension: 'tar.gz'
Expand Down
25 changes: 19 additions & 6 deletions spec/acceptance/consul_exporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,45 @@
describe 'prometheus consul exporter' do
it 'consul_exporter works idempotently with no errors' do
pp = 'include prometheus::consul_exporter'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

describe 'prometheus consul exporter version 0.3.0' do
it ' consul_exporter installs with version 0.3.0' do
pp = "class {'prometheus::consul_exporter': version => '0.3.0' }"
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end
describe process('consul_exporter') do
its(:args) { is_expected.to match %r{\ -consul.server} }
end
describe service('consul_exporter') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end

describe port(9107) do
it { is_expected.to be_listening.with('tcp6') }
end
end

describe 'prometheus consul exporter version 0.4.0' do
it ' consul_exporter installs with version 0.4.0' do
pp = "class {'prometheus::consul_exporter': version => '0.4.0' }"
# Run it twice and test for idempotency
describe 'prometheus consul exporter version 0.5.0' do
it ' consul_exporter installs with version 0.5.0' do
pp = "class {'prometheus::consul_exporter': version => '0.5.0' }"
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end
describe process('consul_exporter') do
its(:args) { is_expected.to match %r{\ --consul.server} }
end
describe service('consul_exporter') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end

describe port(9107) do
it { is_expected.to be_listening.with('tcp6') }
end
end
end

0 comments on commit 538c846

Please sign in to comment.