Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mesos_exporter: update 1.0.0->1.1.2 & add acceptance tests #337

Merged
merged 3 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ prometheus::mesos_exporter::group: 'mesos-exporter'
prometheus::mesos_exporter::user: 'mesos-exporter'
prometheus::mesos_exporter::package_ensure: 'latest'
prometheus::mesos_exporter::package_name: 'mesos_exporter'
prometheus::mesos_exporter::version: '1.0.0'
prometheus::mesos_exporter::version: '1.1.2'
prometheus::haproxy_exporter::cnf_scrape_uri: 'http://localhost:1234/haproxy?stats;csv'
prometheus::haproxy_exporter::download_extension: 'tar.gz'
prometheus::haproxy_exporter::download_url_base: 'https://github.com/prometheus/haproxy_exporter/releases'
Expand Down
41 changes: 41 additions & 0 deletions spec/acceptance/mesos_exporter_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
require 'spec_helper_acceptance'

describe 'prometheus mesos exporter' do
it 'mesos_exporter works idempotently with no errors' do
pp = 'include prometheus::mesos_exporter'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

describe service('mesos_exporter') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end

describe 'prometheus mesos exporter version 1.0.0' do
it 'mesos_exporter installs with version 1.0.0' do
pp = "class {'prometheus::mesos_exporter': version => '1.0.0' }"
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end
describe service('mesos_exporter') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end
end

describe 'prometheus mesos exporter version 1.1.2' do
it 'mesos_exporter installs with version 1.1.2' do
pp = "class {'prometheus::mesos_exporter': version => '1.1.2' }"
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end
describe service('mesos_exporter') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end
end
end
2 changes: 1 addition & 1 deletion spec/classes/mesos_exporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
end

describe 'install correct binary' do
it { is_expected.to contain_file('/usr/local/bin/mesos_exporter').with('target' => '/opt/mesos_exporter-1.0.0.linux-amd64/mesos_exporter') }
it { is_expected.to contain_file('/usr/local/bin/mesos_exporter').with('target' => '/opt/mesos_exporter-1.1.2.linux-amd64/mesos_exporter') }
end
end
end
Expand Down