aboutsummaryrefslogtreecommitdiffstats
path: root/spec/classes/honeycomb_spec.rb
blob: 8fc2252995cf281b970962534a529e767d3b33f6 (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
require 'spec_helper'

describe 'fdio::honeycomb' do
  let(:facts) {{
      :osfamily                  => 'RedHat',
      :operatingsystem           => 'CentOS',
      :operatingsystemmajrelease => '7',
  }}

  let(:pre_condition) { 'include fdio' }

  it { should compile }
  it { should compile.with_all_deps }
  it { should contain_class('fdio::honeycomb') }
  it { should contain_class('fdio::install').that_comes_before('Class[fdio::config]') }
  it { should contain_package('honeycomb').that_requires('Package[vpp]') }
  it { should contain_file('honeycomb.json').that_requires('Package[honeycomb]') }
  it { should contain_file('honeycomb.json').that_notifies('Service[honeycomb]') }
  it { should contain_service('honeycomb').that_requires('Package[honeycomb]') }
  it { should contain_service('honeycomb').that_requires('Service[vpp]') }

  it { should contain_file('honeycomb.json').with(
    'ensure'  => 'file',
    'path'    => '/opt/honeycomb/config/honeycomb.json',
    'owner'   => 'honeycomb',
    'group'   => 'honeycomb',
    )
  }
  it { should contain_service('honeycomb').with(
    'ensure'     => 'running',
    'enable'     => 'true',
    )
  }
end