diff --git a/data/defaults.yaml b/data/defaults.yaml index 76c1bc32a..0c4509cc8 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -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' diff --git a/spec/acceptance/consul_exporter_spec.rb b/spec/acceptance/consul_exporter_spec.rb index 18a6d8d45..400febb13 100644 --- a/spec/acceptance/consul_exporter_spec.rb +++ b/spec/acceptance/consul_exporter_spec.rb @@ -3,7 +3,6 @@ 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 @@ -11,24 +10,38 @@ 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