<commit_before>require 'spec_helper'

# by default we will test with ubuntu 14.04
RSpec.configure do |config|
  config.platform = 'ubuntu'
  config.version = '14.04'
end

describe 'zabbix-agent with default settings' do
  let(:chef_run) { ChefSpec::ServerRunner.converge('zabbix-agent::default') }

  it 'includes zabbix-agent::service to insure the zabbix agent will run' do
    expect(chef_run).to include_recipe('zabbix-agent::service')
  end

  it 'includes zabbix-agent::configure to configure the zabbix agent' do
    expect(chef_run).to include_recipe('zabbix-agent::configure')
  end

  it 'includes zabbix-agent::install to install the zabbix agent' do
    expect(chef_run).to include_recipe('zabbix-agent::install')
  end

  it 'includes zabbix-agent::_package_common to configure zabbix package repository' do
    expect(chef_run).to include_recipe('zabbix-agent::_package_common')
  end

  it 'adds the group "zabbix"' do
    expect(chef_run).to create_group('zabbix')
  end

  it 'adds the user "zabbix" to run the zabbix_agentd as' do
    expect(chef_run).to create_user('zabbix')
  end

  it 'creates the directory /etc/zabbix owned by root.root and mode 755 to store configurations, scripts and UserParamiters' do
    expect(chef_run).to create_directory('/etc/zabbix').with(
      user:   'root',
      group:  'root',
      mode:   '755'
    )
  end

  it 'creates the directory /etc/zabbix/agent_include owned by root.root and mode 755 to store configurations, scripts and UserParamiters' do<commit_msg>removed check for including removed _package_common recipe<commit_after>require 'spec_helper'

# by default we will test with ubuntu 14.04
RSpec.configure do |config|
  config.platform = 'ubuntu'
  config.version = '14.04'
end

describe 'zabbix-agent with default settings' do
  let(:chef_run) { ChefSpec::ServerRunner.converge('zabbix-agent::default') }

  it 'includes zabbix-agent::service to insure the zabbix agent will run' do
    expect(chef_run).to include_recipe('zabbix-agent::service')
  end

  it 'includes zabbix-agent::configure to configure the zabbix agent' do
    expect(chef_run).to include_recipe('zabbix-agent::configure')
  end

  it 'includes zabbix-agent::install to install the zabbix agent' do
    expect(chef_run).to include_recipe('zabbix-agent::install')
  end

  it 'adds the group "zabbix"' do
    expect(chef_run).to create_group('zabbix')
  end

  it 'adds the user "zabbix" to run the zabbix_agentd as' do
    expect(chef_run).to create_user('zabbix')
  end

  it 'creates the directory /etc/zabbix owned by root.root and mode 755 to store configurations, scripts and UserParamiters' do
    expect(chef_run).to create_directory('/etc/zabbix').with(
      user:   'root',
      group:  'root',
      mode:   '755'
    )
  end

  it 'creates the directory /etc/zabbix/agent_include owned by root.root and mode 755 to store configurations, scripts and UserParamiters' do
{'fraction_non_alphanumeric': 0.10095824777549624, 'fraction_numerical': 0.01163586584531143, 'mean_word_length': 4.324225865209471, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4513142', 'n_tokens_mistral': 1016, 'n_tokens_neox': 965, 'n_words': 281}