Skip to content

Commit

Permalink
Update acceptance tests to use current configs
Browse files Browse the repository at this point in the history
Updated base_spec.rb to utilize the newer, supported directory paths
and corrected the ntp panic attribute which is no longer a boolean
value.
  • Loading branch information
dhollinger committed Jun 27, 2017
1 parent 21ddc2f commit cce7d2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$database = $puppetdb::globals::database
$manage_dbserver = true

if $osfamily =~ /Redhat|Debian/ {
if $::osfamily =~ /Redhat|Debian/ {
$manage_pg_repo = true
} else {
$manage_pg_repo = false
Expand Down
10 changes: 5 additions & 5 deletions spec/acceptance/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
describe 'basic tests:' do
it 'make sure we have copied the module across' do
# No point diagnosing any more if the module wasn't copied properly
shell("ls /etc/puppet/modules/puppetdb") do |r|
shell("ls /etc/puppetlabs/code/modules/puppetdb") do |r|
r.exit_code.should == 0
r.stdout.should =~ /Modulefile/
r.stdout.should =~ /metadata\.json/
r.stderr.should == ''
end
end

describe 'single node setup' do
pp = <<-EOS
# Single node setup
class { 'ntp': panic => false } ->
class { 'ntp': panic => undef } ->
class { 'puppetdb': disable_ssl => true, } ->
class { 'puppetdb::master::config': puppetdb_port => '8080', puppetdb_server => 'localhost' }
EOS
Expand All @@ -26,7 +26,7 @@ class { 'puppetdb::master::config': puppetdb_port => '8080', puppetdb_server =>

describe 'enabling report processor' do
pp = <<-EOS
class { 'ntp': panic => false } ->
class { 'ntp': panic => undef } ->
class { 'puppetdb': disable_ssl => true, } ->
class { 'puppetdb::master::config':
puppetdb_port => '8080',
Expand All @@ -40,7 +40,7 @@ class { 'puppetdb::master::config':
apply_manifest(pp, :catch_errors => true)
apply_manifest(pp, :catch_changes => true)

shell('cat /etc/puppet/puppet.conf') do |r|
shell('cat /etc/puppetlabs/puppet/puppet.conf') do |r|
expect(r.stdout).to match(/^reports\s*=\s*([^,]+,)*puppetdb(,[^,]+)*$/)
end
end
Expand Down

0 comments on commit cce7d2c

Please sign in to comment.