Files
puppet-openstacklib/spec/defines/openstacklib_policy_spec.rb
Yanis Guenane 37935472f1 policy.json: Allow puppet modules to manage policy.json
Currently puppet modules does not allow one to manage policy.json.
This commit aims to create a common resource for people to manage
their policies.

Change-Id: I1cd7765cdcbddb7e7ad5d720f1efa382641712f2
2014-09-25 08:42:18 -04:00

24 lines
540 B
Ruby

require 'spec_helper'
describe 'openstacklib::policy::base' do
let :title do
'nova-contest_is_admin'
end
let :params do
{:file_path => '/etc/nova/policy.json',
:key => 'context_is_admin',
:value => 'foo:bar'}
end
it 'configures the proper policy' do
should contain_augeas('/etc/nova/policy.json-context_is_admin-foo:bar').with(
'lens' => 'Json.lns',
'incl' => '/etc/nova/policy.json',
'changes' => 'set dict/entry[*][.="context_is_admin"]/string foo:bar'
)
end
end