Skip to content

Commit

Permalink
Merge pull request #9 from procore/puppet_4
Browse files Browse the repository at this point in the history
Support and test Puppet 4.8
  • Loading branch information
mcasper authored Jan 3, 2017
2 parents 36e350e + 027cc0f commit d9e62a3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ env:
- PUPPET_VERSION="~> 3.2.0"
- PUPPET_VERSION="~> 3.3.0"
- PUPPET_VERSION="~> 3.4.0"
- |
PUPPET_VERSION="~> 4.8.1"
STRICT_VARIABLES=no
notifications:
email:
- sre@procore.com
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ source "https://rubygems.org"
gem "rake"
gem "puppet", ENV['PUPPET_VERSION'] || '~> 2.7.0'
gem "puppet-lint"
gem "rspec-puppet", '~> 1.0.0'
gem "rspec-puppet"
gem "puppet-syntax"
gem "puppetlabs_spec_helper"
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@
}

# The whole dnsmasq configuration directory can be recursively overriden
if $dnsmasq::source_dir {
if $source_dir != '' {
file { 'dnsmasq.dir':
ensure => directory,
path => $dnsmasq::config_dir,
Expand Down
8 changes: 7 additions & 1 deletion spec/classes/dnsmasq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

let(:title) { 'dnsmasq' }
let(:node) { 'rspec.example42.com' }
let(:facts) { { :ipaddress => '10.42.42.42',:concat_basedir => '/var/lib/puppet/concat'} }
let(:facts) { { :ipaddress => '10.42.42.42',:concat_basedir => '/var/lib/puppet/concat', operatingsystemrelease: '14.04' } }

describe 'Test standard installation' do
it { should contain_package('dnsmasq').with_ensure('present') }
Expand Down Expand Up @@ -91,6 +91,12 @@
it { should contain_file('dnsmasq.dir').with_force('true') }
end

describe 'Test customizations - empty source_dir' do
let(:params) { {:source_dir => "" , :source_dir_purge => true } }
it { should_not contain_file('dnsmasq.dir').with_source('puppet:///modules/dnsmasq/dir/spec') }
it { should_not contain_file('dnsmasq.dir').with_purge('true') }
it { should_not contain_file('dnsmasq.dir').with_force('true') }
end
describe 'Test customizations - custom class' do
let(:params) { {:my_class => "dnsmasq::spec" } }
it { should contain_file('dnsmasq.conf').with_content(/rspec.example42.com/) }
Expand Down

0 comments on commit d9e62a3

Please sign in to comment.