Skip to content

Commit

Permalink
add acceptance test to verify default values
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Mar 24, 2018
1 parent d0af39c commit ca62e9a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions spec/acceptance/init_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require 'spec_helper_acceptance'

describe 'zabbix::server class' do
context 'default parameters' do
# Using puppet_apply as a helper
it 'works idempotently with no errors' do
pp = <<-EOS
include nginx
EOS

# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

# do some basic checks
case fact('os.family')
when 'Archlinux'
pkg = 'nginx-mainline'
else
pkg = 'nginx'
end
describe package(pkg) do
it { is_expected.to be_installed }
end

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

0 comments on commit ca62e9a

Please sign in to comment.