<commit_before># ensure hosts file references app server by ip
# TODO: replace hardcoded ip for app-staging host
describe file('/etc/hosts') do
  its(:content) { should match /^127\.0\.1\.1 mon-staging mon-staging$/ }
  app_host_regex = Regexp.quote("#{TEST_VARS['app_ip']}  app-staging")
  its(:content) { should match /^#{app_host_regex}$/ }
end

# ensure required packages are installed
['postfix', 'procmail', 'mailutils', 'securedrop-ossec-server'].each do |pkg|
  describe package(pkg) do
    it { should be_installed }
  end
end

# ensure custom /etc/aliases is present
describe file('/etc/aliases') do
  it { should be_file }
  it { should be_mode '644' }
  its(:content) { should match /^root: ossec$/ }
end<commit_msg>updates regex for lenient whitespace in mon-staging /etc/hosts<commit_after># ensure hosts file references app server by ip
# TODO: replace hardcoded ip for app-staging host
describe file('/etc/hosts') do
  its(:content) { should match /^127\.0\.1\.1\s+mon-staging\s+mon-staging$/ }
  app_host_regex = Regexp.quote("#{TEST_VARS['app_ip']}  app-staging")
  its(:content) { should match /^#{app_host_regex}$/ }
end

# ensure required packages are installed
['postfix', 'procmail', 'mailutils', 'securedrop-ossec-server'].each do |pkg|
  describe package(pkg) do
    it { should be_installed }
  end
end

# ensure custom /etc/aliases is present
describe file('/etc/aliases') do
  it { should be_file }
  it { should be_mode '644' }
  its(:content) { should match /^root: ossec$/ }
end
{'fraction_non_alphanumeric': 0.1424784625579854, 'fraction_numerical': 0.011928429423459244, 'mean_word_length': 4.298245614035087, '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': '7384435', 'n_tokens_mistral': 536, 'n_tokens_neox': 506, 'n_words': 150}