<commit_before>require 'spec_helper'

#
# Glance
#

describe port(9292) do
  it { should be_listening.with('tcp') }
end

describe port(9191) do
  it { should be_listening.with('tcp') }
end

describe package('python-ceph') do
    it { should be_installed }
end

describe file('/etc/glance/glance-api.conf') do
  its(:content) { should match /^default_store ?= ?rbd$/ }
  its(:content) { should match /^rbd_store_pool ?= ?images$/ }
  its(:content) { should match /^rbd_store_user ?= ?glance$/ }
  its(:content) { should match /^rbd_store_ceph_conf ?= ?\/etc\/ceph\/ceph.conf$/ }
end

describe file('/etc/ceph/ceph.client.glance.keyring') do
  it { should be_owned_by 'glance' }
  it { should be_grouped_into 'glance' }
  it { should be_mode 400 }
end

describe cron do
  it { should have_entry('1 0 * * * glance-cache-cleaner').with_user('glance') }
  it { should have_entry('*/30 * * * * glance-cache-pruner').with_user('glance') }<commit_msg>image: don't test python-ceph package<commit_after>require 'spec_helper'

#
# Glance
#

describe port(9292) do
  it { should be_listening.with('tcp') }
end

describe port(9191) do
  it { should be_listening.with('tcp') }
end

describe file('/etc/glance/glance-api.conf') do
  its(:content) { should match /^default_store ?= ?rbd$/ }
  its(:content) { should match /^rbd_store_pool ?= ?images$/ }
  its(:content) { should match /^rbd_store_user ?= ?glance$/ }
  its(:content) { should match /^rbd_store_ceph_conf ?= ?\/etc\/ceph\/ceph.conf$/ }
end

describe file('/etc/ceph/ceph.client.glance.keyring') do
  it { should be_owned_by 'glance' }
  it { should be_grouped_into 'glance' }
  it { should be_mode 400 }
end

describe cron do
  it { should have_entry('1 0 * * * glance-cache-cleaner').with_user('glance') }
  it { should have_entry('*/30 * * * * glance-cache-pruner').with_user('glance') }
{'fraction_non_alphanumeric': 0.1631321370309951, 'fraction_numerical': 0.01631321370309951, 'mean_word_length': 4.183098591549296, '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': '6863257', 'n_tokens_mistral': 729, 'n_tokens_neox': 687, 'n_words': 149}