summaryrefslogtreecommitdiff
path: root/files/puppet/modules/pixelated/spec/classes/pixelated_spec.rb
blob: b24f721120fd0f1e06f3712f0be3152f541ca5f3 (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
require 'spec_helper'

describe 'pixelated' do
  context 'single node' do
    let(:facts) do
      {
        :operatingsystem  => 'Debian',
        :osfamily         => 'Debian',
        :lsbdistid        => 'Debian',
        :lsbdistcodename  => 'jessie',
        :testscenario     => 'single_node',
      }
    end

    let!(:ensure_packages) { MockFunction.new('ensure_packages',{:type => :statement}) } 
    let(:pre_condition) { [
      "class stdlib {}",
      "class apt {}",
      "define rsyslog::snippet($content) {}",
      "define shorewall::rule($source,$destination,$action,$order) {}",
      "define apache::vhost::file($content,$mod_security) {}",
      "define apt::sources_list($content='deb url') {}",
      "define apt::apt_conf($source='file url',$refresh_apt='true') {}",
      "define apt::preferences_snippet($release='stable',$priority='999',$pin='release o=Debian') {}",
    ] }

    it { should contain_class('pixelated::agent') }
  end
end