Add acceptance tests for puppet-haveged

This patch adds some acceptance tests for puppet-haveged, making sure
that we can applied it without errors and ensuring idempotency.
Also we check if the packages are installed and the services are
running.

Change-Id: Ieab5554ddf45c0311d6de7e197c856c87cbccd92
This commit is contained in:
Maitê Balhester 2015-11-12 15:54:03 -02:00
parent c12c3e00a4
commit 1efab539f9
4 changed files with 37 additions and 0 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
Gemfile.lock
.bundled_gems/
log/
junit/
.vagrant/

View File

@ -24,7 +24,10 @@ group :development, :test do
else
gem 'puppet', '~> 3.0', :require => false
end
end
group :system_tests do
gem 'beaker-rspec', :require => false
end
# vim:ft=ruby

View File

@ -0,0 +1,30 @@
require 'spec_helper_acceptance'
describe 'puppet-haveged module' do
def pp_path
base_path = File.dirname(__FILE__)
File.join(base_path, 'fixtures')
end
def default_puppet_module
module_path = File.join(pp_path, 'default.pp')
File.read(module_path)
end
it 'should work with no errors' do
apply_manifest(default_puppet_module, catch_failures: true)
end
it 'should be idempotent' do
apply_manifest(default_puppet_module, catch_changes: true)
end
describe package('haveged') do
it { should be_installed }
end
describe service('haveged') do
it { should be_enabled }
it { should be_running }
end
end

View File

@ -0,0 +1 @@
class { '::haveged': }