summaryrefslogtreecommitdiff
path: root/spec/classes/rsyslog_spec.rb
blob: d6a6bf7e7fb2e439e2d03e04fdc8db6b81819a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
require 'spec_helper'

describe 'rsyslog', :type => :class do
  context "osfamily = RedHat" do
    let :facts do
      {
        :osfamily        => 'RedHat',
      }
    end

    context "default usage (osfamily = RedHat)" do
      let(:title) { 'rsyslog-basic' }

      it 'should compile' do
        should contain_class('rsyslog::install')
        should contain_class('rsyslog::config')
        should contain_class('rsyslog::service')
      end
    end
  end

  context "osfamily = Debian" do
    let :facts do
      {
        :osfamily        => 'Debian',
      }
    end

    context "default usage (osfamily = Debian)" do
      let(:title) { 'rsyslog-basic' }

      it 'should compile' do
        should contain_class('rsyslog::install')
        should contain_class('rsyslog::config')
        should contain_class('rsyslog::service')
      end
    end
  end

  context "osfamily = FreeBSD" do
    let :facts do
      {
        :osfamily        => 'freebsd',
      }
    end

    context "default usage (osfamily = FreeBSD)" do
      let(:title) { 'rsyslog-basic' }

      it 'should compile' do
        should contain_class('rsyslog::install')
        should contain_class('rsyslog::config')
        should contain_class('rsyslog::service')
      end
    end
  end
end