From 005f06f3dde8198fac2ca1a0206e05157e927d3c Mon Sep 17 00:00:00 2001 From: varac Date: Sun, 20 Dec 2015 01:57:04 +0100 Subject: [tests] Use beaker+docker for acceptance tests Beaker together with docker is a very fast way to do acceptance testing. This commit adds basic beaker/docker support: - Add a debian jessie nodeset - Test if the module applies idempotentially, so it doesn't change resources on a second run with the same parameters. https://github.com/puppetlabs/beaker/blob/master/docs/Docker-Support.md --- spec/acceptance/apt_spec.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 spec/acceptance/apt_spec.rb (limited to 'spec/acceptance/apt_spec.rb') diff --git a/spec/acceptance/apt_spec.rb b/spec/acceptance/apt_spec.rb new file mode 100644 index 0000000..a976a56 --- /dev/null +++ b/spec/acceptance/apt_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper_acceptance' + +describe 'apt class' do + + context 'default parameters' do + it 'should work idempotently with no errors' do + pp = <<-EOS + class { 'apt': } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + describe package('apt') do + it { is_expected.to be_installed } + end + + end +end -- cgit v1.2.3