diff options
author | Feng Pan <fpan@redhat.com> | 2017-10-06 00:54:44 -0400 |
---|---|---|
committer | Feng Pan <fpan@redhat.com> | 2017-10-06 00:54:44 -0400 |
commit | 51d315eed319df4e325aed4ed6ae585004273533 (patch) | |
tree | 70f69660fdb747405c69756952d9a083386a494f /spec/classes/honeycomb_spec.rb | |
parent | f7af7a686b888828808786a219dbed45c932d130 (diff) |
Update honeycomb config for 17.10
In 17.10, honeycomb configuration files are split to multiple json
files. Change honeycomb config to write to the new files, also change
from using template to augeas.
Change-Id: Ie4a1289de261b54f8f8cd71779c58361b9e0f7d3
Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'spec/classes/honeycomb_spec.rb')
-rw-r--r-- | spec/classes/honeycomb_spec.rb | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/spec/classes/honeycomb_spec.rb b/spec/classes/honeycomb_spec.rb index 8fc2252..a1968bf 100644 --- a/spec/classes/honeycomb_spec.rb +++ b/spec/classes/honeycomb_spec.rb @@ -14,21 +14,26 @@ describe 'fdio::honeycomb' do it { should contain_class('fdio::honeycomb') } it { should contain_class('fdio::install').that_comes_before('Class[fdio::config]') } it { should contain_package('honeycomb').that_requires('Package[vpp]') } - it { should contain_file('honeycomb.json').that_requires('Package[honeycomb]') } - it { should contain_file('honeycomb.json').that_notifies('Service[honeycomb]') } + it { should contain_augeas('credential.json').that_requires('Package[honeycomb]') } + it { should contain_augeas('credential.json').that_comes_before('Service[honeycomb]') } + it { should contain_augeas('restconf.json').that_requires('Package[honeycomb]') } + it { should contain_augeas('restconf.json').that_comes_before('Service[honeycomb]') } it { should contain_service('honeycomb').that_requires('Package[honeycomb]') } it { should contain_service('honeycomb').that_requires('Service[vpp]') } - it { should contain_file('honeycomb.json').with( - 'ensure' => 'file', - 'path' => '/opt/honeycomb/config/honeycomb.json', - 'owner' => 'honeycomb', - 'group' => 'honeycomb', + it { should contain_augeas('credential.json').with( + 'lens' => 'Json.lns', + 'incl' => '/opt/honeycomb/config/credentials.json', + ) + } + it { should contain_augeas('restconf.json').with( + 'lens' => 'Json.lns', + 'incl' => '/opt/honeycomb/config/restconf.json', ) } it { should contain_service('honeycomb').with( - 'ensure' => 'running', - 'enable' => 'true', + 'ensure' => 'running', + 'enable' => 'true', ) } end |