<commit_before>require 'spec_helper'

describe 'beanstalkd' do
  let (:facts) { {:operatingsystem => "debian"} }

  it { should contain_package('beanstalkd').with_ensure('installed') }

  context 'with listen_addr => 1.2.3.4' do
    let (:params) { {:listen_addr => '1.2.3.4'} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_LISTEN_ADDR\=1\.2\.3\.4$/)
    end
  end

  context 'with listen_port => 12345' do
    let (:params) { {:listen_port => '12345'} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_LISTEN_PORT\=12345$/)
    end
  end

  context 'with binlog_dir => "/test/folder/binlog"' do
    let (:params) { {:binlog_dir => '/test/folder/binlog'} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_BINLOG_DIR\=\/test\/folder\/binlog$/)

      should contain_file('beanstalkd_binlog_dir')
    end
  end

  context 'with binlog_max_size => 98765"' do
    let (:params) { {:binlog_max_size => 98765} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_BINLOG_MAX_SIZE\=98765$/)
    end
  end

  context 'with fsync_max => 10' do
    let (:params) { {:fsync_max => 10} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_FSYNC_MAX\=10$/)
    end
  end

  context 'with job_max_size => 87654' do
    let (:params) { {:job_max_size => 87654} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_JOB_MAX_SIZE\=87654$/)
    end
  end
end
<commit_msg>Ensure failure on despised operating systems<commit_after>require 'spec_helper'

describe 'beanstalkd' do
  let (:facts) { {:operatingsystem => "debian"} }

  it { should contain_package('beanstalkd').with_ensure('installed') }

  context 'with listen_addr => 1.2.3.4' do
    let (:params) { {:listen_addr => '1.2.3.4'} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_LISTEN_ADDR\=1\.2\.3\.4$/)
    end
  end

  context 'with listen_port => 12345' do
    let (:params) { {:listen_port => '12345'} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_LISTEN_PORT\=12345$/)
    end
  end

  context 'with binlog_dir => "/test/folder/binlog"' do
    let (:params) { {:binlog_dir => '/test/folder/binlog'} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_BINLOG_DIR\=\/test\/folder\/binlog$/)

      should contain_file('beanstalkd_binlog_dir')
    end
  end

  context 'with binlog_max_size => 98765"' do
    let (:params) { {:binlog_max_size => 98765} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_BINLOG_MAX_SIZE\=98765$/)
    end
  end

  context 'with fsync_max => 10' do
    let (:params) { {:fsync_max => 10} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_FSYNC_MAX\=10$/)
    end
  end

  context 'with job_max_size => 87654' do
    let (:params) { {:job_max_size => 87654} }

    it do
      should contain_file('beanstalkd_config') \
        .with_content(/^BEANSTALKD_JOB_MAX_SIZE\=87654$/)
    end
  end

  context 'beanstalkd not on debian' do
    let (:facts) { {:operatingsystem => "WindowsNT"} }
    it {
      expect {
        subject
      }.to raise_error(Puppet::Error, /Module beanstalkd is not supported on WindowsNT/)
    }
  end
end

{'fraction_non_alphanumeric': 0.1408290743895514, 'fraction_numerical': 0.03577512776831346, 'mean_word_length': 2.971815107102593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '5426713', 'n_tokens_mistral': 1445, 'n_tokens_neox': 1259, 'n_words': 250}