aboutsummaryrefslogtreecommitdiffstats
path: root/spec/classes
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-09-20 07:50:44 -0400
committerFeng Pan <fpan@redhat.com>2017-09-21 14:36:15 -0400
commitb719cbb990b1c6f56eefb08170fe7d36eb6fbee1 (patch)
treecc74e998a65b2643b1d0135345d2019e6726eaf5 /spec/classes
parent19fa56176090ca9a1dbce1dff944d8946d15b20a (diff)
Add startup exec commands support
This patch adds support for configuring VPP startup exec commands. The commands specified will be appeneded to the exec file specified if the file already exists. JIRA: PUP-6 Change-Id: Ief8097041473573bfdb9c8460b99e14723eaa36d Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'spec/classes')
-rw-r--r--spec/classes/fdio_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/classes/fdio_spec.rb b/spec/classes/fdio_spec.rb
index 3b260ca..b543246 100644
--- a/spec/classes/fdio_spec.rb
+++ b/spec/classes/fdio_spec.rb
@@ -101,6 +101,21 @@ describe 'fdio' do
is_expected.to contain_vpp_config('tapcli/mtu').with_value('9000')
end
end
+
+ context 'with exec commands' do
+ before :each do
+ params.merge!(
+ :vpp_exec_commands => ['test line 1', 'test line 2'],
+ :vpp_exec_file => '/etc/vpp/test_exec_file'
+ )
+ end
+ it 'should configure exec lines' do
+ is_expected.to contain_file('/etc/vpp/test_exec_file').with_ensure('present')
+ is_expected.to contain_vpp_config('unix/exec').with_value('/etc/vpp/test_exec_file')
+ is_expected.to contain_fdio__config__vpp_exec_line('test line 1')
+ is_expected.to contain_fdio__config__vpp_exec_line('test line 2')
+ end
+ end
end
shared_examples_for 'fdio - service' do