-
-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add acceptance test to verify default values
- Loading branch information
1 parent
d0af39c
commit ca62e9a
Showing
1 changed file
with
32 additions
and
0 deletions.
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
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 |