summaryrefslogtreecommitdiffstats
path: root/spec/acceptance/honeycomb_spec.rb
blob: 27358b82588c75ebd7df7700957d5ed852d6d164 (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
require 'spec_helper_acceptance'

describe 'fdio::honeycomb' do

  describe 'default parameters' do
    it 'should work with no errors' do
      pp= <<-EOS
      class { '::fdio': }
      class { '::fdio::honeycomb': }
      EOS

      apply_manifest(pp, :catch_failures => true)
      apply_manifest(pp, :catch_changes => true)
    end

    describe package('honeycomb') do
      it { should be_installed }
    end

    describe file('/opt/honeycomb/config/credentials.json') do
      it { is_expected.to exist }
      its(:content) { should match /"username":\s+"admin"/}
      its(:content) { should match /"password":\s+"admin"/}
    end

    describe file('/opt/honeycomb/config/restconf.json') do
      it { is_expected.to exist }
      its(:content) { should match /"restconf-port":\s+8181/ }
      its(:content) { should match /"restconf-websocket-port":\s+7779/ }
      its(:content) { should match /"restconf-https-binding-address":\s+"127.0.0.1"/ }
      its(:content) { should match /"restconf-binding-address":\s+"127.0.0.1"/ }
    end

    describe service('honeycomb') do
      it { should be_running }
      it { should be_enabled }
    end

  end

end