aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/acceptance/fdio_spec.rb9
-rw-r--r--spec/classes/fdio_spec.rb15
2 files changed, 22 insertions, 2 deletions
diff --git a/spec/acceptance/fdio_spec.rb b/spec/acceptance/fdio_spec.rb
index 18e54b0..68f2013 100644
--- a/spec/acceptance/fdio_spec.rb
+++ b/spec/acceptance/fdio_spec.rb
@@ -31,13 +31,16 @@ describe 'fdio' do
end
- context 'pinning' do
+ context 'with options' do
it 'should work with no errors' do
pp= <<-EOS
class { '::fdio':
repo_branch => 'stable.1707',
vpp_cpu_main_core => '1',
vpp_cpu_corelist_workers => '2',
+ vpp_vhostuser_coalesce_frames => 32,
+ vpp_vhostuser_coalesce_time => 0.05,
+ vpp_vhostuser_dont_dump_memory => true,
}
EOS
@@ -48,7 +51,9 @@ describe 'fdio' do
describe file('/etc/vpp/startup.conf') do
its(:content) { should match /main-core\s+1/ }
its(:content) { should match /corelist-workers\s+2/ }
+ its(:content) { should match /coalesce-frames\s+32/ }
+ its(:content) { should match /coalesce-time\s+0.05/ }
+ its(:content) { should match /dont-dump-memory/ }
end
-
end
end
diff --git a/spec/classes/fdio_spec.rb b/spec/classes/fdio_spec.rb
index 8f0a088..4786ac0 100644
--- a/spec/classes/fdio_spec.rb
+++ b/spec/classes/fdio_spec.rb
@@ -71,6 +71,21 @@ describe 'fdio' do
is_expected.to contain_vpp_config('dpdk/socket-mem').with_value('1024,1024')
end
end
+
+ context 'with vhost-user' do
+ before :each do
+ params.merge!(
+ :vpp_vhostuser_coalesce_frames => 32,
+ :vpp_vhostuser_coalesce_time => 0.05,
+ :vpp_vhostuser_dont_dump_memory => true
+ )
+ end
+ it 'should configure vhost-user options' do
+ is_expected.to contain_vpp_config('vhost-user/coalesce-frames').with_value('32')
+ is_expected.to contain_vpp_config('vhost-user/coalesce-time').with_value('0.05')
+ is_expected.to contain_vpp_config('vhost-user/dont-dump-memory').with_ensure('present')
+ end
+ end
end
shared_examples_for 'fdio - service' do