Assert the exec resource to restart ovs service
This change implements unit tests for the exec resource which was added
by [1].
[1] 1fe71cf5e3
Change-Id: I1dd62d917783f66b11e953ab1c8be6a259553782
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user