diff --git a/spec/classes/vswitch_dpdk_spec.rb b/spec/classes/vswitch_dpdk_spec.rb index c2b5a691..bf9ee507 100644 --- a/spec/classes/vswitch_dpdk_spec.rb +++ b/spec/classes/vswitch_dpdk_spec.rb @@ -57,7 +57,13 @@ describe 'vswitch::dpdk' do is_expected.to contain_vs_config('other_config:vlan-limit').with( :value => nil, :wait => true, ) - + end + it 'restarts the service when needed' do + is_expected.to contain_exec('restart openvswitch').with( + :path => ['/sbin', '/usr/sbin', '/bin', '/usr/bin'], + :command => "systemctl -q restart %s.service" % platform_params[:ovs_service_name], + :refreshonly => true + ) end end diff --git a/spec/classes/vswitch_ovs_spec.rb b/spec/classes/vswitch_ovs_spec.rb index 4821da26..158c2ac8 100644 --- a/spec/classes/vswitch_ovs_spec.rb +++ b/spec/classes/vswitch_ovs_spec.rb @@ -55,6 +55,14 @@ describe 'vswitch::ovs' do :before => 'Service[openvswitch]' ) end + + it 'restarts the service when needed' do + is_expected.to contain_exec('restart openvswitch').with( + :path => ['/sbin', '/usr/sbin', '/bin', '/usr/bin'], + :command => "systemctl -q restart %s.service" % platform_params[:ovs_service_name], + :refreshonly => true + ) + end end context 'custom parameters' do