diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/acceptance/fdio_spec.rb | 4 | ||||
-rw-r--r-- | spec/acceptance/honeycomb_spec.rb | 12 | ||||
-rw-r--r-- | spec/classes/honeycomb_spec.rb | 23 |
3 files changed, 25 insertions, 14 deletions
diff --git a/spec/acceptance/fdio_spec.rb b/spec/acceptance/fdio_spec.rb index 250de9a..293707f 100644 --- a/spec/acceptance/fdio_spec.rb +++ b/spec/acceptance/fdio_spec.rb @@ -7,7 +7,7 @@ describe 'fdio' do it 'should work with no errors' do pp= <<-EOS class { '::fdio': - repo_branch => 'stable.1707' + repo_branch => 'stable.1710' } EOS @@ -35,7 +35,7 @@ describe 'fdio' do it 'should work with no errors' do pp= <<-EOS class { '::fdio': - repo_branch => 'stable.1707', + repo_branch => 'stable.1710', vpp_cpu_main_core => '1', vpp_cpu_corelist_workers => '2', vpp_vhostuser_coalesce_frames => 32, diff --git a/spec/acceptance/honeycomb_spec.rb b/spec/acceptance/honeycomb_spec.rb index 36f8a2e..27358b8 100644 --- a/spec/acceptance/honeycomb_spec.rb +++ b/spec/acceptance/honeycomb_spec.rb @@ -17,14 +17,20 @@ describe 'fdio::honeycomb' do it { should be_installed } end - describe file('/opt/honeycomb/config/honeycomb.json') do + describe file('/opt/honeycomb/config/credentials.json') do it { is_expected.to exist } - its(:content) { should match /"restconf-port":\s+8181/ } - its(:content) { should match /"restconf-websocket-port":\s+7779/ } its(:content) { should match /"username":\s+"admin"/} its(:content) { should match /"password":\s+"admin"/} end + describe file('/opt/honeycomb/config/restconf.json') do + it { is_expected.to exist } + its(:content) { should match /"restconf-port":\s+8181/ } + its(:content) { should match /"restconf-websocket-port":\s+7779/ } + its(:content) { should match /"restconf-https-binding-address":\s+"127.0.0.1"/ } + its(:content) { should match /"restconf-binding-address":\s+"127.0.0.1"/ } + end + describe service('honeycomb') do it { should be_running } it { should be_enabled } 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 |