1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2024-12-16 09:40:35 +00:00

add basic tests

This commit is contained in:
Norbert Varzariu 2016-01-18 20:53:24 +01:00
parent 03c73285ca
commit 09b6b4431c
4 changed files with 9 additions and 7 deletions

3
.bundle/config Normal file
View File

@ -0,0 +1,3 @@
---
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'

View File

@ -1,5 +1,8 @@
fixtures:
repositories:
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
forge_modules:
stdlib:
repo: "puppetlabs/stdlib"
epel:
repo: "stahnma/epel"
symlinks:
"rsnapshot": "#{source_dir}"

View File

@ -14,9 +14,7 @@ class rsnapshot (
$package_ensure = $rsnapshot::params::package_ensure,
$cron = $rsnapshot::params::cron,
) inherits rsnapshot::params {
if $puppetversion =~ /^(1|2|3)/ {
fail('This module requires Puppet 4')
}
if $hosts {
class { '::rsnapshot::install': }->
class { '::rsnapshot::config': }

View File

@ -2,6 +2,4 @@ require 'spec_helper'
describe 'rsnapshot' do
it { should contain_class('rsnapshot::params') }
it { is_expected.to compile }
it { is_expected.to contain_class('rsnapshot::config') }
it { is_expected.to contain_class('rsnapshot::install') }
end