<commit_before>require 'spec_helper'

describe 'filebeat', :type => :class do
  let :facts do
    {
      :kernel => 'Linux',
      :osfamily => 'Debian',
      :lsbdistid => 'Ubuntu',
      :rubyversion => '1.9.3',
    }
  end

  context 'defaults' do
    it { is_expected.to contain_filebeat__params }
    it { is_expected.to contain_package('filebeat') }
    it { is_expected.to contain_file('filebeat.yml').with(
      :path => '/etc/filebeat/filebeat.yml',
      :mode => '0644',
    )}
    it { is_expected.to contain_file('filebeat-config-dir').with(
      :ensure => 'directory',
      :path   => '/etc/filebeat/conf.d',
      :mode   => '0755',
      :recurse => true,
    )}
    it { is_expected.to contain_service('filebeat').with(
      :enable => true,<commit_msg>Testing in Debian should include the lsbdistrelease fact<commit_after>require 'spec_helper'

describe 'filebeat', :type => :class do
  let :facts do
    {
      :kernel => 'Linux',
      :osfamily => 'Debian',
      :lsbdistid => 'Ubuntu',
      :lsbdistrelease => '16.04',
      :rubyversion => '1.9.3',
    }
  end

  context 'defaults' do
    it { is_expected.to contain_filebeat__params }
    it { is_expected.to contain_package('filebeat') }
    it { is_expected.to contain_file('filebeat.yml').with(
      :path => '/etc/filebeat/filebeat.yml',
      :mode => '0644',
    )}
    it { is_expected.to contain_file('filebeat-config-dir').with(
      :ensure => 'directory',
      :path   => '/etc/filebeat/conf.d',
      :mode   => '0755',
      :recurse => true,
    )}
    it { is_expected.to contain_service('filebeat').with(
      :enable => true,
{'fraction_non_alphanumeric': 0.1637032495401594, 'fraction_numerical': 0.01594114040465972, 'mean_word_length': 2.76036866359447, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4486484', 'n_tokens_mistral': 591, 'n_tokens_neox': 553, 'n_words': 110}