<commit_before>require 'spec_helper'

describe 'storm-cluster::nimbus' do
  cached(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }

  it 'Includes the java recipe' do
    expect(chef_run).to include_recipe('java')
  end

  it 'adds the storm group to the system' do
    expect(chef_run).to create_group('storm')
  end

  it 'adds the storm user to run the storm application as' do
    expect(chef_run).to create_user('storm').with(
      comment: 'For storm services',
      group:     'storm',
      home:    '/home/storm',
      shell:   '/bin/bash'
   )
  end

  it 'creates the directory /usr/share/storm' do
    expect(chef_run).to create_directory('/usr/share/storm').with(
      owner: 'root',
      group: 'root',
      mode:  '0644'
    )
  end

  it 'creates the file "/tmp/apache-storm-0.10.0-SNAPSHOT.tar.gz"' do
    expect(chef_run).to create_cookbook_file(
      '/tmp/apache-storm-0.10.0-SNAPSHOT.tar.gz').with(
      source: 'apache-storm-0.10.0-SNAPSHOT.tar.gz'
    )
  end

  it 'runs the install script' do
    expect(chef_run).to run_script('install_storm').with(
      interpreter: 'bash',
      user:        'root'
    )
  end

  it 'adds the tempalted file /usr/share/storm/apache-storm-0.10.0-SNAPSHOT/conf/storm.yaml' do
    expect(chef_run).to create_template(
      '/usr/share/storm/0.10.0-SNAPSHOT/conf/storm.yaml').with(
        source: 'storm.yaml.erb',
        mode:   '0440',
        owner:  'root',
        group:  'root'
    )
  end
end
<commit_msg>change test to reflect version 0.9.3<commit_after>require 'spec_helper'

describe 'storm-cluster::common' do
  cached(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }

  it 'Includes the java recipe' do
    expect(chef_run).to include_recipe('java')
  end

  it 'adds the storm group to the system' do
    expect(chef_run).to create_group('storm')
  end

  it 'adds the storm user to run the storm application as' do
    expect(chef_run).to create_user('storm').with(
      comment: 'For storm services',
      group:     'storm',
      home:    '/home/storm',
      shell:   '/bin/bash'
   )
  end

  it 'creates the directory /usr/share/storm' do
    expect(chef_run).to create_directory('/usr/share/storm').with(
      owner: 'root',
      group: 'root',
      mode:  '0644'
    )
  end

  it 'creates the file "/tmp/apache-storm-0.9.3.tar.gz"' do
    expect(chef_run).to create_cookbook_file(
      '/tmp/apache-storm-0.9.3.tar.gz').with(
      source: 'apache-storm-0.9.3.tar.gz'
    )
  end

  it 'runs the install script' do
    expect(chef_run).to run_script('install_storm').with(
      interpreter: 'bash',
      user:        'root'
    )
  end

  it 'adds the tempalted file /usr/share/storm/apache-storm-0.9.3/conf/storm.yaml' do
    expect(chef_run).to create_template(
      '/usr/share/storm/0.9.3/conf/storm.yaml').with(
        source: 'storm.yaml.erb',
        mode:   '0440',
        owner:  'root',
        group:  'root'
    )
  end
end

{'fraction_non_alphanumeric': 0.14016806722689076, 'fraction_numerical': 0.01815126050420168, 'mean_word_length': 2.6786155747836835, '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': '5282840', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1083, 'n_words': 231}