<commit_before>require 'spec_helper'

describe 'loggly-rsyslog::tls' do
  
  let(:chef_run) do
    ChefSpec::Runner.new do |node|
      node.set['loggly']['token'] = 'some_token_value'
    end.converge(described_recipe)
  end

  it 'uses 6514 as the port' do
    expect(chef_run.node['loggly']['rsyslog']['port']).to eq 6514
  end

  it 'does not install the rsyslog-gnutls package' do
    expect(chef_run).to install_package('rsyslog-gnutls')    
  end

  it 'creates a directory for the certificate' do
    expect(chef_run).to create_directory('/etc/rsyslog.d/keys/ca.d').with(
      owner: 'root',
      group: 'root',
      mode: 0640
    )
  end

  it 'installs the rsyslog-gnutls package' do
    expect(chef_run).to install_package('rsyslog-gnutls')
  end
<commit_msg>Forgot to modify the test to match the correct directory mode<commit_after>require 'spec_helper'

describe 'loggly-rsyslog::tls' do
  
  let(:chef_run) do
    ChefSpec::Runner.new do |node|
      node.set['loggly']['token'] = 'some_token_value'
    end.converge(described_recipe)
  end

  it 'uses 6514 as the port' do
    expect(chef_run.node['loggly']['rsyslog']['port']).to eq 6514
  end

  it 'does not install the rsyslog-gnutls package' do
    expect(chef_run).to install_package('rsyslog-gnutls')    
  end

  it 'creates a directory for the certificate' do
    expect(chef_run).to create_directory('/etc/rsyslog.d/keys/ca.d').with(
      owner: 'root',
      group: 'root',
      mode: 0644
    )
  end

  it 'installs the rsyslog-gnutls package' do
    expect(chef_run).to install_package('rsyslog-gnutls')
  end

{'fraction_non_alphanumeric': 0.12531328320802004, 'fraction_numerical': 0.015037593984962405, 'mean_word_length': 3.602305475504323, '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': '2592325', 'n_tokens_mistral': 611, 'n_tokens_neox': 579, 'n_words': 134}