Files
cookbook-openstack-identity/spec/fernet_tokens_spec.rb
Samuel Cassiba 8a967c291a Keystone config updates for Ocata, style and lint fixes
- Keystone config updates for Ocata
- Style and lint fixes to support newer chefdk
- Rewrote metadata.rb for readability

Change-Id: Ie1d5f27a9cf8803044568a31e4dae7654b02c9a1
2017-08-02 02:17:27 -04:00

34 lines
805 B
Ruby

# encoding: UTF-8
#
require_relative 'spec_helper'
describe 'openstack-identity::_fernet_tokens' do
describe 'ubuntu' do
include_context 'identity_stubs'
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:node) { runner.node }
let(:chef_run) do
runner.converge(described_recipe)
end
it do
expect(chef_run).to create_directory('/etc/keystone/fernet-tokens')
.with(owner: 'keystone', user: 'keystone', mode: 0o0700)
end
[0, 1].each do |key_index|
it do
expect(chef_run).to create_file("/etc/keystone/fernet-tokens/#{key_index}")
.with(
content: "thisisfernetkey#{key_index}",
owner: 'keystone',
group: 'keystone',
mode: 0o0400
)
end
end
end
end