<commit_before>require 'spec_helper'

#
# cloud::volume::controller
#

describe service('cinder-api') do
  it { should be_enabled }
  it { should be_running }
end

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

describe file('/etc/cinder/cinder.conf') do
  it { should contain 'glance_request_timeout=10' }
end

describe service('cinder-backup') do
  it { should be_enabled }
  it { should be_running }
end

describe service('cinder-scheduler') do
  it { should be_enabled }
  it { should be_running }
end

describe service('cinder-volume') do
  it { should be_enabled }
  it { should be_running }
end

#
# cloud::volume::storage
#

describe file('/etc/cinder/cinder.conf') do
  it { should contain "rbd_pool=volumes" }
  it { should contain "rdb_user=cinder" }
  it { should contain "glance_api_version=2" }
end

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

#
# cloud::volume
#<commit_msg>Fix file mode check for Cinder keyring<commit_after>require 'spec_helper'

#
# cloud::volume::controller
#

describe service('cinder-api') do
  it { should be_enabled }
  it { should be_running }
end

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

describe file('/etc/cinder/cinder.conf') do
  it { should contain 'glance_request_timeout=10' }
end

describe service('cinder-backup') do
  it { should be_enabled }
  it { should be_running }
end

describe service('cinder-scheduler') do
  it { should be_enabled }
  it { should be_running }
end

describe service('cinder-volume') do
  it { should be_enabled }
  it { should be_running }
end

#
# cloud::volume::storage
#

describe file('/etc/cinder/cinder.conf') do
  it { should contain "rbd_pool=volumes" }
  it { should contain "rdb_user=cinder" }
  it { should contain "glance_api_version=2" }
end

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

#
# cloud::volume
#
{'fraction_non_alphanumeric': 0.11933174224343675, 'fraction_numerical': 0.00954653937947494, 'mean_word_length': 4.3063291139240505, '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': '3430025', 'n_tokens_mistral': 769, 'n_tokens_neox': 740, 'n_words': 190}