diff options
author | Feng Pan <fpan@redhat.com> | 2017-02-19 15:14:40 -0500 |
---|---|---|
committer | Feng Pan <fpan@redhat.com> | 2017-02-20 10:53:29 -0500 |
commit | ac2d7693e02a11d80879ccd80dc33a4f213295e6 (patch) | |
tree | ba4d6cb546b1db34af796b065be9b625c676cc31 /spec/classes | |
parent | 32ce2b41b1ca0b6224b45d8bf79039db5e15e997 (diff) |
Add support for inline config changes
This patch changes VPP configuration from file template to inline
change directly. This prevents issue with overwriting existing
VPP config.
Change-Id: I4133be8ebe689d9288e3a8e64cca43afd7e42e64
Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'spec/classes')
-rw-r--r-- | spec/classes/fdio_spec.rb | 25 | ||||
-rw-r--r-- | spec/classes/honeycomb_spec.rb | 2 |
2 files changed, 8 insertions, 19 deletions
diff --git a/spec/classes/fdio_spec.rb b/spec/classes/fdio_spec.rb index 0cc065a..4b65779 100644 --- a/spec/classes/fdio_spec.rb +++ b/spec/classes/fdio_spec.rb @@ -46,9 +46,10 @@ describe 'fdio' do shared_examples_for 'fdio - config' do it { - should contain_file('/etc/vpp/startup.conf').with( - 'path' => '/etc/vpp/startup.conf', - ) + should contain_vpp_config('dpdk/uio-driver').with_value('uio_pci_generic') + should contain_vpp_config('dpdk/dev/default') + should contain_vpp_config('cpu/main-core') + should contain_vpp_config('cpu/corelist-workers') } it { should contain_exec('insert_dpdk_kmod').with( @@ -60,24 +61,12 @@ describe 'fdio' do shared_examples_for 'fdio - service' do it { - should contain_vpp_service('vpp').with( - 'ensure' => 'present', - 'pci_devs' => [], - 'state' => 'up', + should contain_service('vpp').with( + 'ensure' => 'running', + 'enable' => true, ) } - context 'with pci dev' do - let(:params) {{:vpp_dpdk_devs => ['0000:00:07.0']}} - - it { - should contain_vpp_service('vpp').with( - 'ensure' => 'present', - 'pci_devs' => ['0000:00:07.0'], - 'state' => 'up', - ) - } - end end context 'on RedHat platforms' do diff --git a/spec/classes/honeycomb_spec.rb b/spec/classes/honeycomb_spec.rb index 8ba367a..fcd31f6 100644 --- a/spec/classes/honeycomb_spec.rb +++ b/spec/classes/honeycomb_spec.rb @@ -15,7 +15,7 @@ describe 'fdio::honeycomb' do it { should contain_file('honeycomb.json').that_requires('Package[honeycomb]') } it { should contain_file('honeycomb.json').that_notifies('Service[honeycomb]') } it { should contain_service('honeycomb').that_requires('Package[honeycomb]') } - it { should contain_service('honeycomb').that_requires('Vpp_service[vpp]') } + it { should contain_service('honeycomb').that_requires('Service[vpp]') } it { should contain_file('honeycomb.json').with( 'ensure' => 'file', |