Skip to content

Commit

Permalink
Added unit test for mongodb_exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
salekseev committed Jul 20, 2017
1 parent 3f44c25 commit 86f298c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/classes/mongodb_exporter_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require 'spec_helper'

describe 'prometheus::mongodb_exporter' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts
end

context 'with version specified' do
let(:params) do
{
version: '0.3.0',
arch: 'amd64',
os: 'linux'
}
end

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

0 comments on commit 86f298c

Please sign in to comment.