-
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #340 from bastelfreak/updates8
process_exporter: update 0.1.0->0.5.0 & add acceptance tests
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
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
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,52 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'prometheus process_exporter' do | ||
it 'process_exporter works idempotently with no errors' do | ||
pp = 'include prometheus::process_exporter' | ||
# Run it twice and test for idempotency | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe service('process-exporter') do | ||
it { is_expected.to be_running } | ||
it { is_expected.to be_enabled } | ||
end | ||
|
||
describe port(9256) do | ||
it { is_expected.to be_listening.with('tcp6') } | ||
end | ||
|
||
describe 'process_exporter update from 0.1.0 to 0.5.0' do | ||
it 'is idempotent' do | ||
pp = "class{'prometheus::process_exporter': version => '0.1.0'}" | ||
# Run it twice and test for idempotency | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe service('process-exporter') do | ||
it { is_expected.to be_running } | ||
it { is_expected.to be_enabled } | ||
end | ||
|
||
describe port(9256) do | ||
it { is_expected.to be_listening.with('tcp6') } | ||
end | ||
it 'is idempotent' do | ||
pp = "class{'prometheus::process_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 service('process-exporter') do | ||
it { is_expected.to be_running } | ||
it { is_expected.to be_enabled } | ||
end | ||
|
||
describe port(9256) do | ||
it { is_expected.to be_listening.with('tcp6') } | ||
end | ||
end | ||
end |